Pavel Stehule <[EMAIL PROTECTED]> writes:
> I expect v1 = [1,2], but v1 is null.
> What is wrong?

Postgres arrays don't work that way; you're assuming the semantics are
like C which they aren't.

You could get an approximation to what you want with array slicing, viz
        v2[1:1][1:2]
but note that this doesn't decrease the dimensionality of the result.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to