From: Rod Taylor <pg@rbt.ca>
To: PFC <lists@boutiquenumerique.com>
Cc: pgsql-sql@postgresql.org
Cc: bernard@bgsoftfactory.com
Subject: Re: Newbie wonder...
Date: Mon, 14 Mar 2005 08:56:22 -0500
Message-ID: <1110808582.1132.34.camel@home> (raw)
In-Reply-To: <opsnmd1uimth1vuj@localhost>
References: <1mmif8pua8zxb.q7qw4hme6jk5.dlg@40tude.net>
<opsnmd1uimth1vuj@localhost>
On Mon, 2005-03-14 at 10:02 +0100, PFC wrote:
> If you want to add a SERIAL field to an existing table, create a sequence
> and then create an integer field with default nextval(seq) and postgres
> will fill it automatically. The order in which it will fill it is not
> guaranteed though !
With 8.0, Alter Table supports most complicated commands including the
addition of SERIAL directly.
alter table abc add column bob serial NOT NULL UNIQUE;
--
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pg@rbt.ca, lists@boutiquenumerique.com, bernard@bgsoftfactory.com
Subject: Re: Newbie wonder...
In-Reply-To: <1110808582.1132.34.camel@home>
* 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