Re: What am I doing wrong with this comma-delimited copy?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What am I doing wrong with this comma-delimited copy?
Дата
Msg-id 13974.1175645880@sss.pgh.pa.us
обсуждение исходный текст
Ответ на What am I doing wrong with this comma-delimited copy?  (James Long <pgsql-novice@museum.rain.com>)
Список pgsql-novice
James Long <pgsql-novice@museum.rain.com> writes:
> james=> \pset fieldsep ,
> Field separator is ",".
> james=> \copy transactions from bar

> psql appears to be treating the entire input line as one tuple,
> instead of seeing the fieldsep value as a field delimiter.

You're confusing psql's output field separator with what COPY will use.
IIRC you need a "delimiter ','" clause on the copy command.

> Also, one issue I can see coming is the date format.  Is there
> a way I can read M-D-Y (or M/D/Y) format dates and store them?

See datestyle.

            regards, tom lane

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

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: What am I doing wrong with this comma-delimited copy?
Следующее
От: "Peter Schonefeld"
Дата:
Сообщение: looping multi-dimensional array