Re: Array constructor requires one argument

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Array constructor requires one argument
Date: 2007-01-09 15:07:33
Message-ID: 20070109150733.GC8359@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 09, 2007 at 10:02:09AM -0500, Tom Lane wrote:
> Martijn van Oosterhout <kleptog(at)svana(dot)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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joris Dobbelsteen 2007-01-09 15:11:14 Re: Autovacuum Improvements
Previous Message Tom Lane 2007-01-09 15:02:09 Re: Array constructor requires one argument