Re: [SQL] triggers and plpgsql question

2002-08-28 Thread Mathieu Arnold
--On mercredi 28 août 2002 08:42 +0200 Mathieu Arnold <[EMAIL PROTECTED]> wrote: > > > --On mardi 27 août 2002 15:38 -0700 Josh Berkus <[EMAIL PROTECTED]> wrote: > >> >> Mathieu, >> >>> The thing I need, is to be able to know what does NEW contains, and I >>> have not found out any mean to

Re: [SQL] triggers and plpgsql question

2002-08-27 Thread Mathieu Arnold
--On mardi 27 août 2002 15:38 -0700 Josh Berkus <[EMAIL PROTECTED]> wrote: > > Mathieu, > >> The thing I need, is to be able to know what does NEW contains, and I >> have not found out any mean to do so. If it's not possible to do so, >> I'll write a function per table, but for the beauty of

Re: [SQL] triggers and plpgsql question

2002-08-27 Thread Josh Berkus
Mathieu, > The thing I need, is to be able to know what does NEW contains, and I have > not found out any mean to do so. If it's not possible to do so, I'll write > a function per table, but for the beauty of all this, I would have liked to > do it the way above. You can't do this in PL/pgSQL.

[SQL] triggers and plpgsql question

2002-08-27 Thread Mathieu Arnold
Hi I want to do a generic function that I can add to triggers to add every inserts, updates and deletes from many differents tables into a common format in another table. the idea is : create function do_it_all () returns opaque ' begin IF TG_OP = ''INSERT'' THEN cycle through all of NEW (