Re: Supporting NULL elements in arrays

From: "Pollard, Mike" <mpollard(at)cincom(dot)com>
To: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Supporting NULL elements in arrays
Date: 2005-11-08 12:43:09
Message-ID: 6418CC03D0FB1943A464E1FEFB3ED46B01B2208E@im01.cincom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> and so the most straightforward thing to do is define an empty element
> as meaning a NULL. But this might be objected to on a couple of
grounds:

Can you use a default to allow the user to specify the default value for
an element? May look a little strange, though, if the user specifies a
default array and a default element value, like:

CREATE TABLE ARR(ARR CHAR(30)[] DEFAULT '{"hello", "good bye"}' NULL);

So the first default is the array default; specify NULL if you don't
want one but do want an array element default; the second, if present,
is the array element default. I'm not sure I like this or not, but it's
an idea.

Mike Pollard
SUPRA Server SQL Engineering and Support
Cincom Systems, Inc

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-11-08 13:07:59 Re: Function with Variable number of parameters
Previous Message Alvaro Herrera 2005-11-08 12:25:59 Re: plperl error when making 8.2dev CVS