copy into serial field with auto_increment

From: Andy <amoeller(at)infosys(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: copy into serial field with auto_increment
Date: 2001-04-18 10:16:54
Message-ID: 3ADD6996.B4D2CCEA@infosys.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)infosys(dot)de

Attachment Content-Type Size
amoeller.vcf text/x-vcard 390 bytes

Browse pgsql-sql by date

  From Date Subject
Next Message Keith Wong 2001-04-18 12:35:09 Re: maybe Offtopic : PostgreSQL & PHP ?
Previous Message Sara Cohen 2001-04-18 09:45:50 Subqueries in select clause