From: Andrew Chilton <andychilton@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: How to autoincrement a primary key...
Date: Sat, 23 Sep 2006 10:00:29 +1200
Message-ID: <a364f6fa0609221500k2ebd88c1q934385ee6856cb50@mail.gmail.com> (raw)
In-Reply-To: <20060922192541.46464.qmail@web31815.mail.mud.yahoo.com>
References: <000001c6de7b$3a211c70$6501a8c0@laptop>
<20060922192541.46464.qmail@web31815.mail.mud.yahoo.com>
On 23/09/06, Richard Broersma Jr <rabroersma@yahoo.com> wrote:
> Is just shorthand notation for:
>
> CREATE SEQUENCE foo START 1;
> CREATE TABLE bar (id integer PRIMARY KEY DEFAULT nextval('bar'));
Doug, just a slight typo correction in that second line Richard gave
you (bar should be foo), it should read in full:
CREATE SEQUENCE foo START 1;
CREATE TABLE bar (id integer PRIMARY KEY DEFAULT nextval('foo'));
Andy
--
name: Andrew Chilton
web: http://kapiti.geek.nz/
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: andychilton@gmail.com
Subject: Re: How to autoincrement a primary key...
In-Reply-To: <a364f6fa0609221500k2ebd88c1q934385ee6856cb50@mail.gmail.com>
* 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