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

From Tom Lane
Subject Re: array_lower /array_prepend doubt
Date
Msg-id 2597.1074708698@sss.pgh.pa.us
Whole thread Raw
In response to Re: array_lower /array_prepend doubt  (Joe Conway <mail@joeconway.com>)
Responses Re: array_lower /array_prepend doubt
List pgsql-sql
Joe Conway <mail@joeconway.com> writes:
> Tom Lane wrote:
>> 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.

> It could perhaps be added to the "Functions and Operators" page for 
> arrays, but it is mentioned here:
> http://www.postgresql.org/docs/current/static/arrays.html#AEN5183

Ah.  I was looking at the mentions of array_prepend() ... but of course
the manual also says that you should use the || operator instead ...
so I guess this mention is sufficient.

The other point about pg_dump failing to correctly restore arrays with
nondefault lower bounds is a good one, though.  We need to think about
how to fix that.
        regards, tom lane


pgsql-sql by date:

Previous
From: Joe Conway
Date:
Subject: Re: array_lower /array_prepend doubt
Next
From: Tom Lane
Date:
Subject: Re: array_lower /array_prepend doubt