Re: Changing array subscripting to zero-offset

Поиск
Список
Период
Сортировка
От Jorge Godoy
Тема Re: Changing array subscripting to zero-offset
Дата
Msg-id 200606220929.36791.jgodoy@gmail.com
обсуждение исходный текст
Ответ на Changing array subscripting to zero-offset  ("Erin Sheldon" <erin.sheldon@gmail.com>)
Список pgsql-general
Em Domingo 18 Junho 2006 11:33, Erin Sheldon escreveu:
> Hello everyone -
>
> Array columns are, by default, 1-offset in their
> subscripting.  Since I usually am calling postgres
> from a language with zero-offset, I would prefer
> that postgres conform to that.  The online
> documentation hints that this may be configurable
> but I haven't been able to find how this is done.
>
> Any help is greatly appreciated,
> Erin Sheldon

You can always sum 1 to your calculations, so that you have an offset from
your programming language from 0 to 1 for the initial position of the array.

I also use a language where zero is the first position of the array.  But if
the behavior is changed, what to do with people that use languages where 1 is
the first position of the array?  I believe that we can't please everyone,
so...

--
Jorge Godoy      <jgodoy@gmail.com>


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

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: Interface Guidance and Opinions Needed
Следующее
От: John DeSoi
Дата:
Сообщение: Re: Form builder?