Re: Array constructor requires one argument - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Array constructor requires one argument
Date
Msg-id 20070109150733.GC8359@svana.org
Whole thread Raw
In response to Re: Array constructor requires one argument  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Array constructor requires one argument  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tue, Jan 09, 2007 at 10:02:09AM -0500, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > Is there a particular reason why the array constructor requires at
> > least one argument?
>
> Define the data type of
>
>         SELECT ARRAY[];

The same type as:

SELECT NULL;

or

SELECT '{}';

We allow the deferring of the decision of the type for normal strings,
why not in this case also? In fact, you could just make it an unknown
literal with just two curly vrace and you'd be all set.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Array constructor requires one argument
Next
From: "Joris Dobbelsteen"
Date:
Subject: Re: Autovacuum Improvements