On Thu, Jun 25, 2009 at 02:53:59PM +0200, Alain Roger wrote: > i would like to execute the following SQL command into a function based on > some IF, END IF tests before. > how can i do that ? 1. you can use execute in pl/pgsql. 2. if your ifs are basically testing if the table exists - you might want to check this: http://www.depesz.com/index.php/2008/06/18/conditional-ddl/ Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: depesz@xxxxxxxxxx / aim:depeszhdl / skype:depesz_hdl / gg:6749007 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general