Re: [SQL] Create functions using a function

2010-03-08 Thread Jasen Betts
On 2010-03-01, Gianvito Pio wrote: > --001485f44fc07594a40480c43c01 > Content-Type: text/plain; charset=ISO-8859-1 > > Hi all, > is there a way to define functions and/or triggers in a function? assuming plpgsql: execute > For example, can I create a function that takes an argument and defines a

Re: [SQL] Create functions using a function

2010-03-01 Thread Petru Ghita
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yes, it's possible. Use EXECUTE. There is one example under "Example 38-9. Porting a Procedure from PL/SQL to PL/pgSQL" http://www.postgresql.org/docs/8.4/static/plpgsql-porting.html Also have look in: http://www.postgresql.org/docs/8.2/static/plpgsq

[SQL] Create functions using a function

2010-03-01 Thread Gianvito Pio
Hi all, is there a way to define functions and/or triggers in a function? For example, can I create a function that takes an argument and defines a function that has the name passed as argument to the first function? Something like this . CREATE FUNCTION test (name varchar) RETURNS VOID AS $