| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Ragged CSV import |
| Date: | 2009-09-09 23:41:33 |
| Message-ID: | 4AA83D2D.9080304@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Robert Haas wrote:
> I agree that ignoring extra columns is a bad idea, but I don't even
> like the idea of ignoring missing columns. It doesn't seem like a
> good idea to take a spreadsheet and feed it into COPY without doing
> any validation anyway, and this is the kind of thing that is trivial
> to clean up with a thin layer of Perl or your scripting language of
> choice.
>
>
If it's an optional feature then I don't see why there is a problem.
What skin is it off anyone else's nose but those whose choose this
behaviour?
I am perfectly familiar with Perl and so is the client that requested
this feature. They are quite technically savvy. They are using a
scripting solution now but they find it cumbersome.
As for general validation, the requestor's application in fact loads the
spreadsheet into a temp table of text columns and then subjects it to a
large variety of complex business rule checking before adding the data
to the main tables. It is a whole lot faster and cleaner to do it that
way than before the data is loaded at all. That's why they aren't
concerned about missing columns.
cheers
andrew
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2009-09-09 23:46:10 | Re: RfD: more powerful "any" types |
| Previous Message | Tom Lane | 2009-09-09 23:30:18 | Re: Bug in aggregates in windowing context |