Re: character varying array bug in 7.4.1

From: "Esh, Andrew" <Andrew_Esh(at)adaptec(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: character varying array bug in 7.4.1
Date: 2004-01-08 20:12:45
Message-ID: B38A3B4F283DBA419282705B57A2425B2E24E0@aime2k02.adaptec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I was able to do this test on a platform running 7.3.2, and the result is the same as version 7.4.1, so if this is a bug, it is also in version 7.3.2.

-----Original Message-----
From: pgsql-bugs-owner(at)postgresql(dot)org
[mailto:pgsql-bugs-owner(at)postgresql(dot)org]On Behalf Of Esh, Andrew
Sent: Thursday, January 08, 2004 12:53 PM
To: pgsql-bugs(at)postgresql(dot)org
Subject: [BUGS] character varying array bug in 7.4.1

Could someone tell me if this bug is trivially reproducible or already solved before I do a lot of needless documentation on it?

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. When there is no space between the close-quotes and the close-curly-brace, the correct value is inserted. This behavior did not occur in 7.1beta5.

Here's a test I did to show the problem:

test=> update nametable set names = '{ "arf" }' where id = 1;
UPDATE 1
golem=> select id, names from nametable where id = 1;
id | names
----+------------------
1 | {"arf "}
(1 row)

golem=> update nametable set names = '{"arf"}' where id = 1;
UPDATE 1
golem=> select id, names from nametable where id = 1;
id | names
----+------------------
1 | {arf}
(1 row)

I'll be glad to document this further if needed.

---
Andrew C. Esh mail:Andrew_Esh[at]adaptec.com
Adaptec, Inc.
2905 Northwest Blvd., Suite 20 763-557-9005 (main)
Plymouth, MN 55441-2644 USA 763-551-6418 (direct)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2004-01-08 20:47:27 Re: Cygwin PostgreSQL 7.4.1 rules regression test failure
Previous Message Esh, Andrew 2004-01-08 18:52:48 character varying array bug in 7.4.1