Re: unused columns in copy

Поиск
Список
Период
Сортировка
От Marcin Stępnicki
Тема Re: unused columns in copy
Дата
Msg-id 179149fe0907201559x3e81028aue0b51ba317c2fbbb@mail.gmail.com
обсуждение исходный текст
Ответ на unused columns in copy  (chester c young <chestercyoung@yahoo.com>)
Ответы Re: unused columns in copy  (nha <lyondif02@free.fr>)
Список pgsql-sql
On Mon, Jul 20, 2009 at 3:22 PM, chester c young<chestercyoung@yahoo.com> wrote:
>
> is there a way for COPY FROM to ignore unused columns in CSV?
>
> in other words, if table t1 has columns c1, c2, and if csv has columns c1, c3, c2, could I do something like
>
> COPY t1( c1, null, c2 ) FROM 'file.csv'

No, but you can use pgloader which can easily deal with your problem
and much more. http://pgfoundry.org/projects/pgloader/


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

Предыдущее
От: Andreas Wenk
Дата:
Сообщение: Re: Table inheritance problem
Следующее
От: nha
Дата:
Сообщение: Re: how to tell if column set on update