Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 542194760E3 for ; Wed, 18 Sep 2002 14:45:17 -0400 (EDT) Received: from mail5.mx.voyager.net (mail5.mx.voyager.net [216.93.66.204]) by postgresql.org (Postfix) with ESMTP id A0760476099 for ; Wed, 18 Sep 2002 14:45:16 -0400 (EDT) Received: from voyager.net (d0.as4.pntc.mi.voyager.net [209.153.138.129]) by mail5.mx.voyager.net (8.11.6/8.10.2) with ESMTP id g8IIijb29666 for ; Wed, 18 Sep 2002 14:44:45 -0400 (EDT) Message-ID: <3D88C991.54BF238E@voyager.net> Date: Wed, 18 Sep 2002 14:44:33 -0400 From: Jim Beckstrom Reply-To: jrbeckstrom@voyager.net X-Mailer: Mozilla 4.61 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: Use of Serial type Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/30 X-Sequence-Number: 1485 Using php, I create a table with a SERIAL field. In the same script, the last thing I do is a COPY ... FROM ... USING DELIMITERS...to load data I have outputted from another system into a text delimited file. I didn't get the autoincrementing of the serial field to work, so I modified my output-from-another-system program to "manually" set the serial field value. That worked. However, it does not seem to have done a default SETVAL. Do I do a "manual" SETVAL of 1 greater than the highest value from the input text file, or am I missing something in the create and copy process? Jim Beckstrom