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

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Simon Riggs <simon@2ndquadrant.com>, Fujii Masao <masao.fujii@gmail.com>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>, Craig Ringer <ringerc@ringerc.id.au>, pgsql-hackers@postgresql.org
Date: 2012-11-14T16:50:56Z
Lists: pgsql-hackers
On 11/14/2012 11:39 AM, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> Yeah, I agree, although the syntax looks a bit unclean.
> Oh, I had not looked at the syntax closely.  I agree, that basically
> sucks: it's overcomplicated and under-featured, because you can't
> control the actual program command line very conveniently.  Nor do I see
> a reason to force this into the model of "program filtering a specific
> file".  What happened to the previous proposal of treating the COPY
> target as a pipe specification, ie
>
> 	COPY table FROM 'some command line |';
> 	COPY table TO '| some command line';
>


I'd like to be able to filter STDIN if possible - with this syntax how 
is COPY going to know to hook up STDIN to the program?

cheers

andrew