Re: Ragged CSV import

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Ragged CSV import
Дата
Msg-id 4B183FD5.4080009@agliodbs.com
обсуждение исходный текст
Ответ на Ragged CSV import  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
Список 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
columnsto 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Adding support for SE-Linux security
Следующее
От: Tim Bunce
Дата:
Сообщение: First feature patch for plperl - draft [PATCH]