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

From David Fetter
Subject Re: Nasty, propagating POLA violation in COPY CSV HEADER
Date
Msg-id 20120620160919.GB11635@fetter.org
Whole thread Raw
In response to Re: Nasty, propagating POLA violation in COPY CSV HEADER  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Nasty, propagating POLA violation in COPY CSV HEADER  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jun 20, 2012 at 11:47:14AM -0400, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > Rather than being totally ignored in the COPY OUT (CSV HEADER)
> > case, the header line in should be parsed to establish which
> > columns are where and rearranging the output if needed.
> 
> This is not "fix a POLA violation".  This is a
> non-backwards-compatible new feature, which would have to have a
> switch to turn it on.

OK, new proposal:

COPY FROM (Thanks, Andrew!  Must not post while asleep...) should have
an option which requires that HEADER be enabled and mandates that the
column names in the header match the columns coming in.

Has someone got a better name for this option than
KEEP_HEADER_COLUMN_NAMES?

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Allow WAL information to recover corrupted pg_controldata
Next
From: Tom Lane
Date:
Subject: Re: Nasty, propagating POLA violation in COPY CSV HEADER