From: Richard Huxton <dev@archonet.com>
To: Radius Administrator <radius@mail.cnz.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: INT8 sequences
Date: Tue, 08 May 2001 20:43:27 +0100
Message-ID: <3AF84C5F.DF5FEE29@archonet.com> (raw)
References: <200105071610.f47GAoT11581@mail.cnz.com>
Radius Administrator wrote:
>
> Is it true that PostgreSQL sequences are always INT4? If so, how
Yep
> would the following be modified to work as obviously intended?
>
> CREATE SEQUENCE tbl_id INCREMENT 1 START 1;
> CREATE TABLE tbl
> (
> id INT8 DEFAULT NEXTVAL('tbl_id') PRIMARY KEY
> );
Check the mailing list archives for lengthy discussions on int8
sequences. Once you've found it's mostly people complaining without
volunteering to do anything go over to http://techdocs.postgresql.org/
and look at Roberto Mello's plpgsql cookbook and the int8 page in my
postgresql notes - I summarised anything useful I saw about it. The
first example I give is probably fine for just generating unique id's.
- Richard Huxton
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, radius@mail.cnz.com
Subject: Re: INT8 sequences
In-Reply-To: <3AF84C5F.DF5FEE29@archonet.com>
References: <200105071610.f47GAoT11581@mail.cnz.com> <3AF84C5F.DF5FEE29@archonet.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