Re: INT8 sequences

From: Richard Huxton <dev(at)archonet(dot)com>
To: Radius Administrator <radius(at)mail(dot)cnz(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: INT8 sequences
Date: 2001-05-08 19:43:27
Message-ID: 3AF84C5F.DF5FEE29@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jack 2001-05-08 23:27:16 transaction isolation question
Previous Message Roger Wernersson 2001-05-08 18:31:13 Re: SQL Server -> Postgres migration: Stored Procedure replacement?