Re: [SQL] Newbie dbadmin out of his league

From: Tim Pizey <tim(at)paneris(dot)co(dot)uk>
To: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Newbie dbadmin out of his league
Date: 1999-09-02 10:26:34
Message-ID: 3.0.3.32.19990902112634.0073164c@popmail.dircon.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)paneris(dot)co(dot)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/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tim Pizey 1999-09-02 10:36:17 Re: [SQL] Newbie dbadmin out of his league
Previous Message Clayton Cottingham 1999-09-02 09:59:47 Re: