\copy command: how to define a tab character as the delimiter

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема \copy command: how to define a tab character as the delimiter
Дата
Msg-id hn3vj5$th4$1@dough.gmane.org
обсуждение исходный текст
Ответы Re: \copy command: how to define a tab character as the delimiter  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

I tried to import a text file using the \copy command in psql using the following:

\copy foo (foo, bar) from foobar.txt delimiter as '\t' csv header

but that gives me an error:

ERROR:  COPY delimiter must be a single one-byte character

So how can I specify a tab character if I also need to specify that my file has a header line?

Regards
Thomas

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: kernel version impact on PostgreSQL performance
Следующее
От: Harald Fuchs
Дата:
Сообщение: Re: DROP column: documentation unclear