Received: from mailhost2.dircon.co.uk (mailhost2.dircon.co.uk [194.112.32.66]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA61559 for ; Thu, 2 Sep 1999 06:26:26 -0400 (EDT) (envelope-from tim@paneris.co.uk) Received: from eric6 (paneris.co.uk [194.112.47.112]) by mailhost2.dircon.co.uk (8.9.3/8.9.3) with SMTP id LAA81702; Thu, 2 Sep 1999 11:26:21 +0100 (BST) Message-Id: <3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk> X-Sender: paneris@popmail.dircon.co.uk X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.3 (32) Date: Thu, 02 Sep 1999 11:26:34 +0100 To: "Ross J. Reedstrom" From: Tim Pizey Subject: Re: [SQL] Newbie dbadmin out of his league Cc: pgsql-sql@postgreSQL.org In-Reply-To: <19990827171140.A15338@wallace.ece.rice.edu> References: <7648.935788758@sss.pgh.pa.us> <3.0.3.32.19990827211232.006f4c40@popmail.dircon.co.uk> <7648.935788758@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 17:11 27/08/99 -0500, Ross J. Reedstrom wrote: >On Fri, Aug 27, 1999 at 05:19:18PM -0400, Tom Lane wrote: >> Tim Pizey writes: >> > 2. How do I use COPY? >> >> >> Just create the sequence with the right starting value (one past last >> ID being loaded). You can do that before or after the COPY, doesn't >> matter. > >What I always do with sequences that are autocreated for serial types >(and so have a start value of 1), after the COPY puts all my data in place: > >select setval('tablename_field_seq',max(field)) from tablename; > Thanks Ross, I tried this but the max() function takes as long as anything else as far as I can see. yours Tim Pizey Happy to take part:// www.paneris.co.uk/