From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: Ragged CSV import |
Date: | 2009-12-03 22:46:45 |
Message-ID: | 4B183FD5.4080009@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Douglas,
> 1. Copy to non-existent table - create it from the data type using most generic datatypes
Yes, that would be nice. Types chosen would pretty much have to be
TEXT, NUMERIC, and TIMESTAMP for everything though; anything else is too
variable.
> 2. provide column mapping function - from what I understand that the column list on a copy from is the target columns to load. I assume there must be a header record and the same columns in the
So, like:
COPY table1 ( cola, colb, colc ) FROM 'somecsv.csv' ( 'name', 'place',
'date') WITH CSV HEADER
... which would copy 'name' to cola, 'place' to colb, 'date' to colc,
and ignore any other columns present in the file?
--Josh Berkus
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Bunce | 2009-12-03 23:30:29 | First feature patch for plperl - draft [PATCH] |
Previous Message | Josh Berkus | 2009-12-03 22:23:34 | Re: Adding support for SE-Linux security |