Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
| От | Tom Lane |
|---|---|
| Тема | Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY |
| Дата | |
| Msg-id | 26216.1347546321@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | WIP patch: add (PRE|POST)PROCESSOR options to COPY ("Etsuro Fujita" <fujita.etsuro@lab.ntt.co.jp>) |
| Ответы |
Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY |
| Список | pgsql-hackers |
"Etsuro Fujita" <fujita.etsuro@lab.ntt.co.jp> writes:
> 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.
The proposed patch causes the external processor programs to execute
with the privileges of the database server, which seems like a pretty
horrid idea. At the very least this would imply limiting use of the
feature to superusers, which greatly restricts its use-case.
I think it would be a lot better if this were designed so that the
processor programs executed on client side. Which would probably make
it not a COPY patch at all, but something in psql.
regards, tom lane
В списке pgsql-hackers по дате отправления: