Re: Importing/Appending to Existing Table - Mailing list pgsql-general

From Greg Williamson
Subject Re: Importing/Appending to Existing Table
Date
Msg-id 212306.72652.qm@web46115.mail.sp1.yahoo.com
Whole thread Raw
In response to Importing/Appending to Existing Table  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Importing/Appending to Existing Table  (Rich Shepard <rshepard@appl-ecosys.com>)
List 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 by date:

Previous
From: Adarsh Sharma
Date:
Subject: Re: Installation Issue of PostgresPlus-9.0
Next
From: Wouter D'Haeseleer
Date:
Subject: Hot-Standby and sequences