Skip site navigation (1) Skip section navigation (2)

Re: Behaviour of rows containg not-null domains in plpgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: Postgresql-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Behaviour of rows containg not-null domains in plpgsql
Date: 2008-02-24 17:57:30
Message-ID: 5379.1203875850@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
> I just stumbled over the following behaviour, introduced with 8.3, and
> wondered if this is by design or an oversight.

No, this was in 8.2.

> If you define a domain over some existing type, constrain it to
> non-null values, and use that domain as a field type in a table 
> definition, it seems to be impossible to declare pl/pgsql variables
> of that table's row type. The problem seems to be that upon declaration,
> the row variable is filled with nulls - but since the domain is marked
> not-null, that immediatly triggers an exception.

What else would you expect it to do?  AFAICS any other behavior would be
contrary to spec.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andy PavloDate: 2008-02-24 18:04:42
Subject: Re: Improved (De)Serialization Support
Previous:From: Joshua D. DrakeDate: 2008-02-24 17:47:15
Subject: Re: 8.3 / 8.2.6 restore comparison

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group