PG 7.4 beta 2: COPY IN, arrays, and double quotes bug. - Mailing list pgsql-bugs

From Bertrand Petit
Subject PG 7.4 beta 2: COPY IN, arrays, and double quotes bug.
Date
Msg-id 20030908073445.A90341@memo.frmug.org
Whole thread Raw
Responses Re: PG 7.4 beta 2: COPY IN, arrays, and double quotes bug.  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: bug report: pg_dump does not use CASCADE in DROP
Next
From: "George Weaver"
Date:
Subject: Re: [SQL] [GENERAL] plPGSQL bug in function creation