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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Joey Adams <joeyadams3(dot)14159(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq should have functions for escaping data for use in COPY FROM
Date: 2012-03-15 14:17:49
Message-ID: 19641.1331821069@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stuart Bishop 2012-03-15 14:18:36 Re: BUG #6532: pg_upgrade fails on Python stored procedures
Previous Message Shigeru HANADA 2012-03-15 14:06:18 Re: pgsql_fdw, FDW for PostgreSQL server