Re: [BUGS] documentation bug - behave of NEW a OLD in plpgsql's triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: [BUGS] documentation bug - behave of NEW a OLD in plpgsql's triggers
Date: 2011-05-06 03:32:54
Message-ID: 1927.1304652774@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-docs

Josh Kupershmidt <schmiddy(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2011-05-06 06:20:09 Re: BUG #6002: French character show garbled
Previous Message Josh Kupershmidt 2011-05-06 02:58:24 Re: [BUGS] documentation bug - behave of NEW a OLD in plpgsql's triggers

Browse pgsql-docs by date

  From Date Subject
Next Message Susanne Ebrecht 2011-05-06 10:15:15 Re: characters or bytes?
Previous Message Josh Kupershmidt 2011-05-06 02:58:24 Re: [BUGS] documentation bug - behave of NEW a OLD in plpgsql's triggers