Issue: \ is escaped oddly when displaying the contents of array fields.
Severity: annoyance
Affects: 8.1.3, 8.1.4, 8.0.3, possibly others.
Demonstration of bug:
When saving \ escaped values into text array fields, the \ is escaped when
displaying the contents of the array, leading to an appearance that the
correct data was not saved:
scratch=# create table test_arr ( tarr text[] );
CREATE TABLE
scratch=# insert into test_arr values ( array['x\y','x\\y','x y'] );
INSERT 5695623 1
scratch=# select * from test_arr;
tarr
-------------------
{xy,"x\\y","x y"}
(1 row)
scratch=# select tarr[1] from test_arr;
tarr
------
xy
(1 row)
scratch=# select tarr[2] from test_arr;
tarr
------
x\y
(1 row)
--
--Josh
Josh Berkus
PostgreSQL @ Sun
San Francisco