pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Kupershmidt <schmiddy@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: [BUGS] documentation bug - behave of NEW a OLD in plpgsql's triggers
Date: Thu, 05 May 2011 23:32:54 -0400
Message-ID: <1927.1304652774@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTin=Z+JZLwXKOnNmxcDKt2aXr8p4vg@mail.gmail.com>
References: <BANLkTi=Neok1uboh4P4jxuGWBpbOFH2wdQ@mail.gmail.com>
	<BANLkTikzDpBjvUmkoYFWQVPDOdmYX=KFKw@mail.gmail.com>
	<1102.1304649395@sss.pgh.pa.us>
	<BANLkTin=Z+JZLwXKOnNmxcDKt2aXr8p4vg@mail.gmail.com>

Josh Kupershmidt <schmiddy@gmail.com> writes:
> Hrm, guess I learned something. I tested with a trigger function which used:
> ...
>      IF NEW IS NULL THEN
>        RAISE NOTICE 'new is null.';
> ...

> which was giving me 'ERROR:  record "new" is not assigned yet' when
> used as an on-delete trigger.

Hmm ... I wonder whether we couldn't make that case work, since IS NULL
shouldn't particularly care whether the record has a known tuple
structure or not.  Still, it's probably not worth spending effort on ...

			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <1927.1304652774@sss.pgh.pa.us>
Permalink:  ../1927.1304652774@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1927.1304652774@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, schmiddy@gmail.com, pavel.stehule@gmail.com, pgsql-docs@postgresql.org
  Subject: Re: [BUGS] documentation bug - behave of NEW a OLD in plpgsql's triggers
  In-Reply-To: <1927.1304652774@sss.pgh.pa.us>
  References: <BANLkTi=Neok1uboh4P4jxuGWBpbOFH2wdQ@mail.gmail.com> <BANLkTikzDpBjvUmkoYFWQVPDOdmYX=KFKw@mail.gmail.com> <1102.1304649395@sss.pgh.pa.us> <BANLkTin=Z+JZLwXKOnNmxcDKt2aXr8p4vg@mail.gmail.com> <1927.1304652774@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox