Re: Insert text to column using copy command

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Insert text to column using copy command
Дата
Msg-id 21198.1447000537@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Insert text to column using copy command  (Shmagi Kavtaradze <kavtaradze.s@gmail.com>)
Список pgsql-novice
Shmagi Kavtaradze <kavtaradze.s@gmail.com> writes:
> I want to import text to a specific column and for other columns to specify
> literals/constants myself, using same copy command.

COPY is not bright enough to do what you want.  I'd suggest copying into
a temporary table that just receives the data literally as it appears in
the file, and then using INSERT ... SELECT ... to transform the data and
put it into the final table.

            regards, tom lane


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

Предыдущее
От: Shmagi Kavtaradze
Дата:
Сообщение: Insert text to column using copy command
Следующее
От: Michael Convey
Дата:
Сообщение: Linux Users vs PostgreSQL Users