Re: Let file_fdw access COPY FROM PROGRAM - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Let file_fdw access COPY FROM PROGRAM
Date
Msg-id CAMsr+YFo3sO3i1dAB+5-nD2AgJP6L8yMAGFeF9nh163cTSzBQw@mail.gmail.com
Whole thread Raw
In response to Let file_fdw access COPY FROM PROGRAM  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: Let file_fdw access COPY FROM PROGRAM  (Corey Huinker <corey.huinker@gmail.com>)
List pgsql-hackers
On 3 June 2016 at 04:48, Corey Huinker <corey.huinker@gmail.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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Rename max_parallel_degree?
Next
From: Noah Misch
Date:
Subject: Re: Perf Benchmarking and regression.