Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9519847636B for ; Wed, 28 Aug 2002 02:42:16 -0400 (EDT) Received: from bilbo.in.mat.cc (bilbo.in.mat.cc [212.43.217.121]) by postgresql.org (Postfix) with ESMTP id 22C6F476347 for ; Wed, 28 Aug 2002 02:42:15 -0400 (EDT) Received: from sauron (sauron.in.mat.cc [212.43.217.122]) by bilbo.in.mat.cc (Postfix) with ESMTP id C3C9771184; Wed, 28 Aug 2002 08:42:11 +0200 (CEST) Date: Wed, 28 Aug 2002 08:42:13 +0200 From: Mathieu Arnold To: josh@agliodbs.com Cc: pgsql-sql@postgresql.org Subject: Re: triggers and plpgsql question Message-ID: <169617531.1030524133@sauron> In-Reply-To: <200208271538.45877.josh@agliodbs.com> References: <374862253.1030472287@andromede.reaumur.absolight.net> <200208271538.45877.josh@agliodbs.com> X-Mailer: Mulberry/3.0.0b1 (Win32) X-wazaaa: True, true MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/376 X-Sequence-Number: 9222 --On mardi 27 ao=FBt 2002 15:38 -0700 Josh Berkus wrote: >=20 > Mathieu, >=20 >> 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. >=20 > You can't do this in PL/pgSQL. See the online documentation on writing= =20 > triggers in C; that is the only way to get what you want. So, if I want to avoid C, I'll have to write a function per table. I'll have a look at SPI (as I believe after a short readout of the doc, I'll need it). --=20 Mathieu Arnold