From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: textarray option for file FDW |
Date: | 2011-01-15 18:07:59 |
Message-ID: | 4D31E27F.3030600@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/15/2011 12:44 PM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>> ... So now I'd like to add a
>> new option to it: "textarray". This option would require that the
>> foreign table have exactly one field, of type text[], and would compose
>> all the field strings read from the file for each record into the array
>> (however many there are).
> Why is this a good thing? It seems like it would accomplish little
> except to defeat the SQL type system entirely.
>
>
We have discussed previously allowing this sort of thing. It's not a new
proposal at all.
My use case is that I have a customer who reads in data like this (using
my patch to allow ragged CSV input, which you previously objected to)
and then performs a sophisticated battery of validity tests on the data
before loading it into its final destination. To do that their
requirement is that we not error out on reading the data, so we load the
data into a table that is all text fields.
In fact, having COPY read in a text array is *your* suggestion:
<http://archives.postgresql.org/pgsql-hackers/2009-09/msg00547.php>.
This is simply a proposal to implement that via FDW, which makes it easy
to avoid any syntax issues.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2011-01-15 18:10:48 | pg_basebackup for streaming base backups |
Previous Message | Noah Misch | 2011-01-15 17:53:55 | Re: patch: fix performance problems with repated decomprimation of varlena values in plpgsql |