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

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

I'll put some thought into it, but note that it is hardly a new issue -- 
it's been possible to create an array with < 1 lower bound since well 
before 7.4:

regression=# select version();                   version
----------------------------------------------------------------------- PostgreSQL 7.3.5 on i686-pc-linux-gnu, compiled
byGCC gcc (GCC) 3.2.2 
 
20030222 (Red Hat Linux 3.2.2-5)
(1 row)

regression=# create table a(f1 int, f2 int[]);
CREATE TABLE
regression=# insert into a values (1,'{1,2}');
INSERT 565511 1
regression=# update a set f2[0] = 0 where f1 = 1;
UPDATE 1
regression=# select array_dims(f2) from a; array_dims
------------ [0:2]
(1 row)


Joe




pgsql-sql by date:

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