From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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:32:58 |
Message-ID: | 50A3C7BA.7030000@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/14/2012 11:20 AM, Tom Lane wrote:
> I disagree with Simon's objection also, because neither reading from
> nor writing to an external program is likely to fit the model of
> reading/updating a table very well. For instance, there's no good
> reason to suppose that reading twice will give the same results. So
> force-fitting this usage into the FDW model is not going to work well.
>
> Nor do I really see the argument why a "pipe_fdw" module is cleaner
> than a "COPY TO/FROM pipe" feature.
>
>
Yeah, I agree, although the syntax looks a bit unclean.
Maybe something like
COPY foo FROM wherever WITH (FILTER '/path/to/program')
might work better. You'd hook up the source to the filter as its stdin
and read its stdout. Not sure what we'd do for \copy though.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-11-14 16:33:33 | Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY |
Previous Message | Alvaro Herrera | 2012-11-14 16:27:26 | Re: foreign key locks |