Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> 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
but note that this doesn't decrease the dimensionality of the result.
regards, tom lane
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2004-06-04 15:15:31|
|Subject: Re: build postgresql-7.4.2 fails: FATAL: semctl(35, 16, SETVAL, 536) failed: Inv,alid argument |
|Previous:||From: Donald Fraser||Date: 2004-06-04 14:05:26|
|Subject: Cached PL/PGSQL query plan failure|