Array constructor requires one argument - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Array constructor requires one argument
Date
Msg-id 20070109102501.GA8359@svana.org
Whole thread Raw
Responses Re: Array constructor requires one argument  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

Is there a particular reason why the array constructor requires at
least one argument? It's a bit irriating to have to special case zero
length arrays.

# select array[];
ERROR:  syntax error at or near "]" at character 14
# select array[1];
 array
-------
 {1}
(1 row)

# select '{}'::int4[];
 int4
------
 {}
(1 row)

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: Csaba Nagy
Date:
Subject: Re: [OT] Advice needed on using postgres in commercial
Next
From: "Gregory S. Williamson"
Date:
Subject: Confused by misleading error message on SP creation