Re: Implicit casts with generic arrays
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joe Conway <mail@joeconway.com>
Cc: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgresql.org
Date: 2007-06-06T20:22:42Z
Lists: pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> Tom Lane wrote:
>> Maybe I am missing something, but the only such construct I see in
>> SQL2003 is concatenation of arrays of equal rank. There is nothing
>> corresponding to array_prepend or array_append.
> Well, I've never claimed to be particularly good at interpreting the SQL
> spec, but as an example...
> <array concatenation> ::=
> <array value expression 1> || <array primary>
> <array primary> ::=
> <value expression primary> ::=
> <nonparenthesized value expression primary> ::=
> <unsigned value specification> ::=
> <unsigned literal> ::=
> <unsigned numeric literal>
> Doesn't this mean that array concatenation should include things like:
> <array value expression> || <unsigned numeric literal>
No, because the first syntax rule for that is
1) The declared type of <value expression primary> shall be an
array type.
However, assuming that the anynonarray idea works out, we can do that
and not worry about touching the array operators.
regards, tom lane