From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Esh, Andrew" <Andrew_Esh(at)adaptec(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: character varying array bug in 7.4.1 |
Date: | 2004-01-08 21:41:19 |
Message-ID: | 16145.1073598079@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Esh, Andrew" <Andrew_Esh(at)adaptec(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Guy Thornley | 2004-01-08 22:01:15 | Re: Crash while recovering database index relation |
Previous Message | Jason Tishler | 2004-01-08 21:05:35 | Re: Cygwin PostgreSQL 7.4.1 rules regression test failure |