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

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Can I reset the lower bound of an array.
Дата
Msg-id 4086B97F.4070608@joeconway.com
обсуждение исходный текст
Ответ на Re: Can I reset the lower bound of an array.  (Mark Gibson <gibsonm@cromwell.co.uk>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Jord Tanner
Дата:
Сообщение: kill -2
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: 7.3.4 on Linux: UPDATE .. foo=foo+1 degrades massivly over time