Re: Importing/Appending to Existing Table

Поиск
Список
Период
Сортировка
От Greg Williamson
Тема Re: Importing/Appending to Existing Table
Дата
Msg-id 212306.72652.qm@web46115.mail.sp1.yahoo.com
обсуждение исходный текст
Ответ на Importing/Appending to Existing Table  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Importing/Appending to Existing Table  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general
Rich --
>
>

>   I have an existing table with 15,492 rows and want to add additional rows
> from a .csv file. If I use 'COPY <tablename> from <filename> with delimiter
> as ":" csv quote as "'" ' will this overwrite existing rows in the table or
> append rows?

It will not overwrite any existing data; if the table has constraints that will
prevent duplicates then the entire load will fail if any item fails (it is a
single transaction).

If the table doesn't have such constraints then duplicate data in the copy file
will result in duplicate rows.

HTH,

Greg Williamson




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

Предыдущее
От: Adarsh Sharma
Дата:
Сообщение: Re: Installation Issue of PostgresPlus-9.0
Следующее
От: Wouter D'Haeseleer
Дата:
Сообщение: Hot-Standby and sequences