PG 7.4 beta 2: COPY IN, arrays, and double quotes bug.

From: Bertrand Petit <pgsql-bugs(at)phoe(dot)frmug(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: PG 7.4 beta 2: COPY IN, arrays, and double quotes bug.
Date: 2003-09-08 05:34:45
Message-ID: 20030908073445.A90341@memo.frmug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


I spoted a trouble with the HEAD taged PG version CVS updated
on the 4th of september.

During a COPY FROM stdin query involving a VARCHAR[] column I
experienced troubles with values containing an escaped double quote.
The query was expressed like this on the application side:

"COPY my_table "
"(..., attribs) "
"FROM stdin WITH DELIMITER '\\t'"

One of the attribs value is piped to the backend as {"3/4\""}, this is
how the array appears on the wire, and PG rejected it with the
following message, as submited to syslog:

postgres[90257]: [51-1] ERROR: malformed array literal: "{"3/4""}"

Regards,
Bertrand.

P.S.: despites that this PG vresion was CVS updated after the release
of beta 2, it still identifies itself as beta1:

=> select version();
version
------------------------------------------------------------------------
PostgreSQL 7.4beta1 on i386-unknown-freebsd4.5, compiled by GCC 2.95.3
(1 row)

When PG is compiled from a CVS working directory tree, it would be
nice if the output of the version() function could include a latest
update timestamp and maybe a list of the sticky tags.

--
%!PS
297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100
180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180
0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont
240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2003-09-08 07:55:56 VIRUS INFECTED MESSAGE NOT DELIVERED
Previous Message Tom Lane 2003-09-08 04:01:30 Re: help with mac osx 10.2.6