Re: Can I reset the lower bound of an array.

From: Joe Conway <mail(at)joeconway(dot)com>
To: Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can I reset the lower bound of an array.
Date: 2004-04-21 18:12:15
Message-ID: 4086B97F.4070608@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Gibson wrote:
> Mark Gibson wrote:
>
>> b) resetting the lower bound of the array (without affecting elements)?
>> eg: set_array_lower(1 || ARRAY[2,3,4], 1) -- 2nd arg is the new
>> lower bound

It should be pretty easy to create a C function to reset the lower bound
of an array to some arbitrary value.

Worth noting, however, is that there have been some discussions
regarding the fact that the SQL spec defines arrays as hiving a fixed
lower bound of 1, and that we might need (or at least want) to comply
with that in order to support NULL array elements. I've been hoping to
put together a coherent proposal for such changes, but have
unfortunately not been able to find the time. I'd still like to try to
get agreement and make the changes for 7.5. If anyone has strong
opinions, now would be a good time to get them on the table.

Joe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Nolan 2004-04-21 18:17:26 Re: PL/SQL question
Previous Message Jord Tanner 2004-04-21 18:07:42 kill -2