Re: Adding many rows to a table.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Adding many rows to a table.
Дата
Msg-id 26976.958884857@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Adding many rows to a table.  ("Stuart Grimshaw" <stuart@stubbynet.org.uk>)
Список pgsql-sql
"Stuart Grimshaw" <stuart@stubbynet.org.uk> writes:
> The docs suggest using "copy to" for inserting lots of data. I created a
> string :

> COPY TO keywords FROM STDIN USING DELIMITERS ',';
> 520,cheese
> 520,bread
> 521,pickle
> 522,spam
> \.

> and then executed it, and got the following error

> ERROR:  parser: parse error at or near "520"

> So my question is, after all that, is that the right way to construct my
> string (regardless of language, Perl C/C++ etc)

That does work as a psql script.  In other client interfaces you might
need to submit the COPY data separately from the initial COPY command.
Hard to say more without knowing exactly what you tried with which
interface ...
        regards, tom lane


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

Предыдущее
От: "Stuart Grimshaw"
Дата:
Сообщение: Adding many rows to a table.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Foreign keys breaks tables permissions