pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy <amoeller@infosys.de>
To: pgsql-sql@postgresql.org
Subject: copy into serial field with auto_increment
Date: Wed, 18 Apr 2001 12:16:54 +0200
Message-ID: <3ADD6996.B4D2CCEA@infosys.de> (raw)

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

Attachments:

amoeller.vcf (text/x-vcard, 389B) download begin:vcard n:Möller;Andy-Kim tel;cell:0179/2302856 tel;fax:06109 / 505 25 tel;home:06661/4526 tel;work:06109 / 505 193 x-mozilla-html:FALSE url:http://www.ypsilon.net org:i. A. d. F. Ypsilon - Network GmbH;Database - Managment & Software - Development adr:;;Vilbeler Landstr. 203;Frankfurt;Hessen;60388;Germany version:2.1 email;internet:amoeller@infosys.de fn:Andy-Kim Möller end:vcard

view thread (2+ messages)  latest in thread

Message-ID: <3ADD6996.B4D2CCEA@infosys.de>
Permalink:  ../3ADD6996.B4D2CCEA@infosys.de/
Also on:    postgresql.org/message-id/3ADD6996.B4D2CCEA@infosys.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: amoeller@infosys.de
  Subject: Re: copy into serial field with auto_increment
  In-Reply-To: <3ADD6996.B4D2CCEA@infosys.de>
  References: <3ADD6996.B4D2CCEA@infosys.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox