Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Date
Msg-id 1347542458-sup-8574@alvh.no-ip.org
Whole thread Raw
In response to WIP patch: add (PRE|POST)PROCESSOR options to COPY  ("Etsuro Fujita" <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Excerpts from Etsuro Fujita's message of jue sep 13 06:13:26 -0300 2012:
> I'd like to add the following options to the SQL COPY command and the psql \copy
> instruction:
>
>     * PREPROCESSOR: Specifies the user-supplied program for COPY IN.  The data
> from an input file is preprocessed by the program before the data is loaded into
> a postgres table.
>     * POSTPROCESSOR: Specifies the user-supplied program for COPY OUT.  The data
> from a postgres table is postprocessed by the program before the data is stored
> in an output file.

External programs?  I don't like the sound of that; there all kinds of
open questions, security concerns, and process management problems.
What if the pre- and postprocessors were functions instead?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: remove dead ports?
Next
From: Pavel Stehule
Date:
Subject: Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY