pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Pizey <tim@paneris.co.uk>
To: Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Newbie dbadmin out of his league
Date: Thu, 02 Sep 1999 11:26:34 +0100
Message-ID: <3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk> (raw)
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>

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 <tim@paneris.co.uk> 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/





view thread (6+ messages)  latest in thread

Message-ID: <3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk>
Permalink:  ../3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk/
Also on:    postgresql.org/message-id/3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk

 · 

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: tim@paneris.co.uk, reedstrm@wallace.ece.rice.edu
  Subject: Re: [SQL] Newbie dbadmin out of his league
  In-Reply-To: <3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk>
  References: <7648.935788758@sss.pgh.pa.us> <3.0.3.32.19990827211232.006f4c40@popmail.dircon.co.uk> <3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk>

* 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