Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Date: 2012-09-13 13:25:38
Message-ID: CAFj8pRCXfKX8z-8o6LWjOdzq8b=KWABEfD+fn7S95BEbadPw4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/9/13 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>:
> 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?

+1

this can be solved via pipe and outer processes

Pavel

>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-09-13 13:29:08 Re: remove dead ports?
Previous Message Alvaro Herrera 2012-09-13 13:23:13 Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY