Re: libpq should have functions for escaping data for use in COPY FROM - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq should have functions for escaping data for use in COPY FROM
Date
Msg-id 19641.1331821069@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq should have functions for escaping data for use in COPY FROM  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> 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 and a
> half.

Yeah, it wouldn't be easy.  The other point to keep in mind here is that
one of the key requirements for anything dealing with COPY is that it be
fast.  It seems likely to me that bespoke code for a particular encoding
and set of copy options would outrun something that's general-purpose.
Now maybe people would be happy to use something slower if it meant
they didn't have to write it themselves, but ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Shigeru HANADA
Date:
Subject: Re: pgsql_fdw, FDW for PostgreSQL server
Next
From: Alvaro Herrera
Date:
Subject: Re: CREATE FOREGIN TABLE LACUNA