Re: Let file_fdw access COPY FROM PROGRAM

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: PG <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Let file_fdw access COPY FROM PROGRAM
Date: 2016-06-03 05:06:08
Message-ID: CAMsr+YFo3sO3i1dAB+5-nD2AgJP6L8yMAGFeF9nh163cTSzBQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 June 2016 at 04:48, Corey Huinker <corey(dot)huinker(at)gmail(dot)com> wrote:

> A while back, there was a push to make COPY gzip-aware. That didn't
> happen, but COPY FROM PROGRAM did, and it scratches the same itch.
>

> - writing unwanted columns to a temp/work table via COPY, and then
> immediately re-reading them
>

Without wanting to take away from the value of letting file FDW access FROM
PROGRAM, I think this really merits a solution that applies to COPY as
well. Variants on "how do I COPY just some columns from a CSV" is a real
FAQ, and it doesn't seem like it'd be excessively hard to support. We'd
just need some way to pass a list of column-ordinals or header-names.

Not asking you to do that work, just pointing out that this particular
issue applies to COPY its self as well.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2016-06-03 05:57:33 Re: Perf Benchmarking and regression.
Previous Message Peter Eisentraut 2016-06-03 04:33:02 Re: Rename max_parallel_degree?