Re: array_lower /array_prepend doubt - Mailing list pgsql-sql

From Tom Lane
Subject Re: array_lower /array_prepend doubt
Date
Msg-id 1648.1074705270@sss.pgh.pa.us
Whole thread Raw
In response to array_lower /array_prepend doubt  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Responses Re: array_lower /array_prepend doubt
List pgsql-sql
Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> can anyone explain why
>  SELECT array_lower(array_prepend(0, ARRAY[1,2,3]), 1);
> returns 0 not 1

Because array_prepend keeps the subscripts of the existing array
elements the same.  This was discussed during development of the
code, but I don't see anything in the documentation that mentions it.
        regards, tom lane


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: array_lower /array_prepend doubt
Next
From: Joe Conway
Date:
Subject: Re: array_lower /array_prepend doubt