Re: SQL99 ARRAY support proposal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SQL99 ARRAY support proposal
Date
Msg-id 17399.1047182796@sss.pgh.pa.us
Whole thread Raw
In response to SQL99 ARRAY support proposal  (Joe Conway <mail@joeconway.com>)
Responses Re: SQL99 ARRAY support proposal
List pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> select ARRAY[1,2,3];
>    result '{1,2,3}'

The array type is determined how?  I'd like this syntax better if there
were a way to force the choice of array type...

> select ARRAY[(select oid from pg_class order by relname)];
>    result is array of all the oid's in pg_class in relname order

Puh-leez tell me that's not in the spec.  How is one supposed to
distinguish this usage from the scalar-subselect case?

> select ARRAY[1,2] || 3
>    result '{1,2,3}'

Datatypes?  How many variants of the || operator do you plan to offer?
What will be the side-effects on the parser's ability to pick one?

> select ARRAY[1,2] || ARRAY[3,4]
>    result '{1,2,3,4}'

Same worry as above; likewise for the "proposed extensions".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: SQL99 ARRAY support proposal
Next
From: Justin Clift
Date:
Subject: Re: website charset