Re: Ragged CSV import - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Ragged CSV import
Date
Msg-id 603c8f070909100658j723c030crce65ffbe9ea958fe@mail.gmail.com
Whole thread Raw
In response to Re: Ragged CSV import  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Ragged CSV import
List pgsql-hackers
On Thu, Sep 10, 2009 at 9:56 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Dimitri Fontaine <dfontaine@hi-media.com> writes:
>> Last time we opened this can of worms here's what it lead us to:
>>   http://archives.postgresql.org/pgsql-hackers/2008-04/msg00222.php
>
> Right, that's the discussion I was remembering.
>
>> As already said by Andrew on IRC, though, this goes nowhere to help him
>> address his direct concern, COPY would still choke on input lines that
>> are containing too few or too many columns...
>
> An easy fix for that is to allow this form of COPY to return text[]
> instead of a fixed number of text columns.

Hmm... in fact, what if we just implemented COPY returning text[] for
a first cut, and forget making it act like a table source for now.
Then you could COPY to a temp table (with a text[] column) and select
from there.  There's really two separate features here: COPY producing
text[] rather than a record type, and COPY being embeddable in some
larger query.

...Robert


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Ragged CSV import
Next
From: Tatsuo Ishii
Date:
Subject: Re: pgbench hard coded constants