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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Date: 2012-11-14 16:39:44
Message-ID: 20745.1352911184@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)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';

> Not sure what we'd do for \copy though.

Adding a pipe symbol to the target works exactly the same for \copy.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-11-14 16:46:54 Re: Enabling Checksums
Previous Message Simon Riggs 2012-11-14 16:36:02 Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY