Re: SQL99 ARRAY support proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL99 ARRAY support proposal
Date: 2003-03-09 04:06:36
Message-ID: 17399.1047182796@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Joe Conway <mail(at)joeconway(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Clift 2003-03-09 04:24:30 Re: website charset
Previous Message Joe Conway 2003-03-09 03:55:04 SQL99 ARRAY support proposal

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2003-03-09 05:01:15 Re: Dump CLUSTER in pg_dump
Previous Message Joe Conway 2003-03-09 03:55:04 SQL99 ARRAY support proposal