Re: maintaining sequences

From: Shaun Thomas <sthomas(at)townnews(dot)com>
To: <roypgsqlgen(at)xemaps(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: maintaining sequences
Date: 2001-09-13 19:49:18
Message-ID: Pine.LNX.4.33L2.0109131447060.10387-100000@hamster.lee.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mihai Gheorghiu 2001-09-13 21:22:49 Sequence value
Previous Message Mihai Gheorghiu 2001-09-13 19:42:22 Naming conventions