Re: Nasty, propagating POLA violation in COPY CSV HEADER

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Nasty, propagating POLA violation in COPY CSV HEADER
Date: 2012-06-20 19:22:48
Message-ID: 3037.1340220168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-06-20 19:23:34 Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node
Previous Message Peter Geoghegan 2012-06-20 19:22:11 Re: pgbench--new transaction type