Re: plpgsql: UPDATE...Returning in FOR loop

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 'PostgreSQL' <pgsql-general(at)postgresql(dot)org>
Subject: Re: plpgsql: UPDATE...Returning in FOR loop
Date: 2009-03-02 22:03:54
Message-ID: 49AC57CA.1010507@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/03/2009 20:19, Tom Lane wrote:

> Well, that has nothing to do with UPDATE RETURNING; it's apparently
> failing here:
>
>> rec recipients;
>
> I suppose "recipients" is a composite type one of whose columns is of a
> NOT NULL domain. Best advice is "don't do that" --- not-null domains

Thanks Tom and Sam for your replies - I hadn't absorbed the bit in the
docs about variables being initialised to NULL in the absence of
anything else.... removing NOT NULL from message_type_domain did the
trick, and all works as I hoped.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message SHARMILA JOTHIRAJAH 2009-03-02 23:32:22 Re: How to pipe the psql copy command to Unix 'Date' command
Previous Message Sam Mason 2009-03-02 20:29:08 Re: plpgsql: UPDATE...Returning in FOR loop