From: | "Jeff Eckermann" <jeckermann(at)verio(dot)net> |
---|---|
To: | <roypgsqlgen(at)xemaps(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: maintaining sequences |
Date: | 2001-09-13 21:45:15 |
Message-ID: | 030301c13c9d$62befba0$279c10ac@INTERNAL |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You can just reset the next-available value with "select setval
('sequencename', newvalue);"
----- Original Message -----
From: "Shaun Thomas" <sthomas(at)townnews(dot)com>
To: <roypgsqlgen(at)xemaps(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, September 13, 2001 2:49 PM
Subject: Re: [GENERAL] maintaining sequences
> On Thu, 13 Sep 2001 roypgsqlgen(at)xemaps(dot)com wrote:
>
> > Or I guess I'm asking if I can add a default sequence into a column
> > after I've created the table and added data to it?
>
> The easiest way to do this is just create your table as normal, do
> your data load (it will ignore the sequence if you're manually setting
> the identity columns) and then drop and recreate the sequence with
> the starting value you want.
>
> See, easy. ^_^
>
> --
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
> | Shaun M. Thomas INN Database Programmer |
> | Phone: (309) 743-0812 Fax : (309) 743-0830 |
> | Email: sthomas(at)townnews(dot)com AIM : trifthen |
> | Web : hamster.lee.net |
> | |
> | "Most of our lives are about proving something, either to |
> | ourselves or to someone else." |
> | -- Anonymous |
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | augie | 2001-09-13 21:52:46 | plpgsql/cursor |
Previous Message | Mihai Gheorghiu | 2001-09-13 21:22:49 | Sequence value |