Re: Implicit casts with generic arrays - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Implicit casts with generic arrays
Date
Msg-id 7529.1181161362@sss.pgh.pa.us
Whole thread Raw
In response to Re: Implicit casts with generic arrays  (Joe Conway <mail@joeconway.com>)
List 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


pgsql-hackers by date:

Previous
From: Hannes Eder
Date:
Subject: Re: msvc, build and install with cygwin in the PATH
Next
From: "Simon Riggs"
Date:
Subject: Re: [RFC] GSoC Work on readonly queries done so far