Thread: text array

text array

From
Laurette Cisneros
Date:
Perhaps someone can shed light on this problem we are seeing.

In a table on Postgresql 7.2.b2, we have a table with one of the columns defined as
text[7].  If you select * from tab1, this columns data comes out as this:
yada | yoda           | {"wkend","wkd","wkd","wkd","wkd","wkd","wkend"}

Then we dump and restore into a table with the exact same schema (this
column is a text[7]) but now when you select data from the table is comes
out looking like this:
yada | yoda           | {wkend,wkd,wkd,wkd,wkd,wkd,wkend}


Was the handling of arrays changed in this latest release of the server?

Specifically, we have a java program that reads this table data and expects
it returned with the double quotes.  It is now failing.

Any information on this would be helpful.

Thanks,

-- 
Laurette Cisneros
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
Passenger Information Everywhere




Re: text array

From
Tom Lane
Date:
Laurette Cisneros <laurette@nextbus.com> writes:
> Was the handling of arrays changed in this latest release of the server?

Yes.  Double quotes are now inserted if and only if needed to re-parse
the array value correctly.  The old code inserted quotes more or less
at-whim.
        regards, tom lane