Re: [HACKERS] PQescapeString/copy problem.

2002-12-29 Thread Tom Lane
Kurt Roeckx <[EMAIL PROTECTED]> writes: > I'm using copy to import a table. I use PQescapeString() to make > it safe, but it seems to have a problem when there is a ' in it. PQescapeString is not designed to escape data for COPY, and will not do the right thing. Quoting ' is not needed for COPY;

[HACKERS] PQescapeString/copy problem.

2002-12-29 Thread Kurt Roeckx
I'm using copy to import a table. I use PQescapeString() to make it safe, but it seems to have a problem when there is a ' in it. The column that is being copy is a varchar. If the string that is being copied is the size of the varchar, and the string contains a ', I get an error that the string