Received: from mail.em-systems.net ([192.204.202.165]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f27Eujx85383 for ; Wed, 7 Mar 2001 09:56:45 -0500 (EST) (envelope-from lyonj@EM-Systems.com) Received: (qmail 28134 invoked from network); 7 Mar 2001 16:16:26 -0000 Received: from unknown (HELO EM-Systems.com) (216.151.68.113) by mail.em-systems.net with SMTP; 7 Mar 2001 16:16:26 -0000 Message-ID: <3AA64A7F.B59028F9@EM-Systems.com> Date: Wed, 07 Mar 2001 09:49:35 -0500 From: lyonj@EM-Systems.com X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Cedar Cox CC: pgsql-interfaces@postgresql.org Subject: Re: Re: can't delete record References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/65 X-Sequence-Number: 1226 I might have read that in Bruce's book. Any serious PostgreSQL developer should read it cover to cover! I agree, plpgsql should return an error if you try to access NEW when TG_OP='DELETE'. Jeffrey Cedar Cox wrote: > Bingo! That was it.. Thank you. > > BTW, is this behavior documented (no error message)? It should be. > Even better, make plpgsql a little nicer ;) > > -Cedar > > On Wed, 7 Mar 2001, Jeffrey Lyon wrote: > > > Do you have a trigger applied against this record on DELETE? If so, are > > you returning NEW or OLD? I think that you need to return NEW on an > > UPDATE or INSERT and an OLD on DELETE. > > > > Jeffrey > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly