Re: COPY with default values?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY with default values?
Дата
Msg-id 5108.990801221@sss.pgh.pa.us
обсуждение исходный текст
Ответ на COPY with default values?  (Jeff Boes <jboes@nexcerpt.com>)
Ответы Re: COPY with default values?  (Jeff Boes <jboes@nexcerpt.com>)
Compilation fails --with-ssl on Solaris 8  (Arcady Genkin <a.genkin@utoronto.ca>)
Список pgsql-general
Jeff Boes <jboes@nexcerpt.com> writes:
> Now I would like to initialize this table with a COPY statement, but
> without supplying values for the primary key.

COPY does not deal with insertion of default values.  Sorry.

One rather klugy answer is to COPY to a temp table that has only the
columns you want to supply, and then INSERT ... SELECT into the main
table.  Might be faster if there are enough rows involved.

            regards, tom lane

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

Предыдущее
От: Manuel Durán Aguete
Дата:
Сообщение: [URGENT] How to generata a unique string id
Следующее
От: Jeff Boes
Дата:
Сообщение: Re: COPY with default values?