From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: COPY with column headings |
Date: | 2004-08-16 19:38:38 |
Message-ID: | 200408161938.i7GJccR00333@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > The use case is that it fits in with the way spreadsheets usually do
> > data tables, and many will only allow you to export a whole worksheet
> > (including the heading row) to CSV, not a part of one. Conversely,
> > working with imported data tables will be harder if they lack headings.
>
> Well, if we wanted to *require* a heading row in CSV mode, it would be
> relatively foolproof. What I don't like is the proposal for an
> independent option; you've got a 50-50 chance of getting it wrong on
> import, and that's too high odds for me.
But we have other CVS options with even lower odds of success on a
random guess. People have to know if their input file has headings,
period. Telling people they can't have the option because they might
get it wrong seems strange to me.
> Next question: are you imagining that the header row will actually have
> any semantic significance on input? Will we check the column names?
> Will we be willing to rearrange the columns if the header row claims the
> column order is different than the COPY command says?
I assume no semantic significance to header row values on input.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2004-08-16 19:49:54 | Re: [HACKERS] SRPM for 8.0.0 beta? |
Previous Message | Dann Corbit | 2004-08-16 19:29:44 | Re: COPY with column headings |