public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Josh Kupershmidt <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: pgsql-docs <[email protected]>
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: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Josh Kupershmidt <[email protected]> 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

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [BUGS] documentation bug - behave of NEW a OLD in plpgsql's triggers
  In-Reply-To: <[email protected]>

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

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