Re: Nasty, propagating POLA violation in COPY CSV HEADER - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Nasty, propagating POLA violation in COPY CSV HEADER
Date
Msg-id 3037.1340220168@sss.pgh.pa.us
Whole thread Raw
In response to Re: Nasty, propagating POLA violation in COPY CSV HEADER  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
>> 
>> 4) MAP_HEADER ('column 1'-> 'col_1', 'Date' -> 'input_date' ...)
>> 
>> to cover the case when column names do not match.

> Personally, I think that's going way beyond what we want to do with
> COPY.

I agree --- if you know that much about the incoming data, you might as
well just specify the correct column list in the COPY command.  This
would only have use if you know somebody used weird column names, but
not the order they put the columns in; which seems like a thin use-case.

The three options Josh enumerated seem reasonably sane to me.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: pgbench--new transaction type
Next
From: Heikki Linnakangas
Date:
Subject: Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node