Re: [HACKERS] libpq should have functions for escaping data for use in COPY FROM

2012-03-15 Thread Tom Lane
Robert Haas writes: > Considering all the above, this seems like it might be a solution in > search of a problem. It's not actually that hard to write code to do > proper escaping for a *given* encoding and a *given* set of COPY > options, but trying to write something general sounds like a job a

Re: [HACKERS] libpq should have functions for escaping data for use in COPY FROM

2012-03-14 Thread Robert Haas
On Fri, Mar 9, 2012 at 9:16 PM, Joey Adams wrote: > libpq has functions for escaping values in SQL commands > (PQescapeStringConn, PQescapeByteaConn, and the new PQescapeLiteral), > and it supports parameterizing queries with PQexecParams.  But it does > not (to my knowledge) have functions for es

[HACKERS] libpq should have functions for escaping data for use in COPY FROM

2012-03-09 Thread Joey Adams
libpq has functions for escaping values in SQL commands (PQescapeStringConn, PQescapeByteaConn, and the new PQescapeLiteral), and it supports parameterizing queries with PQexecParams. But it does not (to my knowledge) have functions for escaping values for COPY FROM. COPY FROM is useful for inser