COPY, but not everything...

Поиск
Список
Период
Сортировка
От Ian Harding
Тема COPY, but not everything...
Дата
Msg-id sef8391c.078@mail.tpchd.org
обсуждение исходный текст
Список pgsql-general
I have a big ascii text file that I would only like to import columns 1, 3 and 7 from.  I know I can filter it through
cut,but I wonder if there is an undocumented way to do it with COPY.  Sybase has a useless function called filler()
thatyou use for fields you want to ignore.  For example (psuedocode...) 

COPY mytable (col1, filler(), filler(), col2, filler(), col3) FROM '/tmp/foobar';

I like the new functionality allowing me to ignore columns in the target table, and to rearrange the columns, but this
functionalityseems to be missing... (Or I am reading it wrong...) 

Thanks!

Ian Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
iharding@tpchd.org
Phone: (253) 798-3549
Pager: (253) 754-0002



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

Предыдущее
От: Paul Ramsey
Дата:
Сообщение: Re: Failure to install 7.3.3
Следующее
От: Alan Williams
Дата:
Сообщение: Re: Inheritance & Indexes