Martijn van Oosterhout writes:
> On Tue, Jan 09, 2007 at 04:09:21PM -0500, Tom Lane wrote:
>> One possibility that might handle Martijn's problem is to allow the
>> construct
>> ARRAY[]::type[]
> I don't think it would be too hard to fix, I'll look tomorrow.
It could be pretty ugly, because type
On Tue, Jan 09, 2007 at 04:09:21PM -0500, Tom Lane wrote:
> Joe Conway <[EMAIL PROTECTED]> writes:
> > Unless we can convince ourselves that array-of-UNKNOWN is not dangerous,
> > I don't think this is easily solved.
>
> One possibility that might handle Martijn's problem is to allow the
> constr
On Tue, Jan 09, 2007 at 04:09:21PM -0500, Tom Lane wrote:
> Joe Conway <[EMAIL PROTECTED]> writes:
> > Unless we can convince ourselves that array-of-UNKNOWN is not dangerous,
> > I don't think this is easily solved.
>
> One possibility that might handle Martijn's problem is to allow the
> constr
Joe Conway <[EMAIL PROTECTED]> writes:
> Unless we can convince ourselves that array-of-UNKNOWN is not dangerous,
> I don't think this is easily solved.
One possibility that might handle Martijn's problem is to allow the
construct
ARRAY[]::type[]
that is, you can have an empty ARRAY con
Tom Lane wrote:
Martijn van Oosterhout writes:
On Tue, Jan 09, 2007 at 10:02:09AM -0500, Tom Lane wrote:
Define the data type of
SELECT ARRAY[];
The same type as:
SELECT NULL;
Hardly, because whatever type NULL has, it's not an array type.
Here's a link to the initial discussion on
Martijn van Oosterhout writes:
> On Tue, Jan 09, 2007 at 10:02:09AM -0500, Tom Lane wrote:
>> Define the data type of
>> SELECT ARRAY[];
> The same type as:
> SELECT NULL;
Hardly, because whatever type NULL has, it's not an array type.
> In fact, you could just make it an unknown
> literal with
On Tue, Jan 09, 2007 at 10:02:09AM -0500, Tom Lane wrote:
> Martijn van Oosterhout 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 '{
Martijn van Oosterhout writes:
> Is there a particular reason why the array constructor requires at
> least one argument?
Define the data type of
SELECT ARRAY[];
regards, tom lane
---(end of broadcast)---
T
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[];