Search Postgresql Archives

Re: Importing/Appending to Existing Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


      

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux