PQescapeString/copy problem.

From: Kurt Roeckx <Q(at)ping(dot)be>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PQescapeString/copy problem.
Date: 2002-12-30 01:23:36
Message-ID: 20021230012336.GA11853@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 is too big for the
varchar.

PQescapeString() turns the ' into a '', which should work I
think, but doesn't.

I'm currently replacing the '' by a \' and that seems to work for
me.

Kurt

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-12-30 01:50:09 Re: [Fwd: SETOF input parameters (was Re: [HACKERS] proposal:
Previous Message Joe Conway 2002-12-30 01:18:08 Re: [Fwd: SETOF input parameters (was Re: [HACKERS] proposal: