copy into serial field with auto_increment - Mailing list pgsql-sql

From Andy
Subject copy into serial field with auto_increment
Date
Msg-id 3ADD6996.B4D2CCEA@infosys.de
Whole thread Raw
Responses Re: copy into serial field with auto_increment  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-sql
Hello,

i've got a textfile of data separated by '|'. One of the fields in my
table is a serial (auto_increment) field.
When i import the data with the copy command i get duplicate key error.
The key is the serial - field.
I recognized that the copy command doesn't auto_increment the serial
field. I come from mysql and pushed a 0 into the serial field. But it
doesn't work. I tested it with an empty field, but it failed to.
How could i make it work ??

Thanx for every help

--
Andy - Kim Möller
Leiter Lastminute / Pauschal - Deutschland ypsilon.net AG
Leiter Entwicklungsabteilung Lastminute / Pauschal / Mietwagen -
Deutschland ypsilon.net AG

Tel.: (06109) - 50 50
FAX : (06109) - 50 525
eMail : amoeller@infosys.de


Attachment

pgsql-sql by date:

Previous
From: Mateusz Mazur
Date:
Subject: Postgres book
Next
From: Lamar Owen
Date:
Subject: Re: [GENERAL] Where are the 7.1 RPM's?