Re: character varying array bug in 7.4.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: character varying array bug in 7.4.1
Дата
Msg-id 16145.1073598079@sss.pgh.pa.us
обсуждение исходный текст
Ответ на character varying array bug in 7.4.1  ("Esh, Andrew" <Andrew_Esh@adaptec.com>)
Список pgsql-bugs
"Esh, Andrew" <Andrew_Esh@adaptec.com> writes:
> I upgraded from 7.1beta5 to 7.4.1 recently, and I noticed that many of
> my character varying arrays were getting a trailing space inserted
> into their last value. This appears to be the result of white space
> being misplaced during the INSERT/UPDATE command. If there is a space
> before the close-curly-brace, it gets appended to the last quoted
> value.

It's been that way since 7.2, and was intentional.  IIRC, the array
parser's behavior in 7.1 and before was inconsistent across datatypes,
and we concluded this was the closest we could get to backwards
compatibility while still having something moderately sane.  It is
documented:

    You may write whitespace before a left brace, after a right
    brace, or before any individual item string. Whitespace after an
    item is not ignored, however: after skipping leading whitespace,
    everything up to the next right brace or delimiter is taken as
    the item value.

See http://www.postgresql.org/docs/7.4/static/arrays.html#AEN5228

            regards, tom lane

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

Предыдущее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1045: hostname lookup in psql or libpg.sl does work
Следующее
От: Guy Thornley
Дата:
Сообщение: Re: Crash while recovering database index relation