On 14 November 2012 15:09, Fujii Masao <masao.fu...@gmail.com> wrote:

>> Here, progname for COPY IN is the user-supplied program that takes filename 
>> as
>> its argument and that writes on standard output.
>
> What about further extending the COPY IN syntax to the following?
>
>     COPY table_name FROM 'progname [ option, ... ]' WITH ...
>
> I'd just like to execute
>
>     COPY vmstat_table FROM 'vmstat' WITH ...

I think we should be using FDWs/SRFs here, not inventing new
syntax/architectures for executing external code, so -1 from me.

We can already do
INSERT table SELECT * FROM fdw;
with any logic for generating data lives inside an FDW or SRF.

If we want it in COPY we can have syntax like this...
COPY table FROM (SELECT * FROM fdw)

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to