Re: INT8 sequences - Mailing list pgsql-sql

From Richard Huxton
Subject Re: INT8 sequences
Date
Msg-id 3AF84C5F.DF5FEE29@archonet.com
Whole thread Raw
In response to INT8 sequences  (Radius Administrator <radius@mail.cnz.com>)
List 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


pgsql-sql by date:

Previous
From: bboett@erm1.u-strasbg.fr (Bruno Boettcher)
Date:
Subject: no more pg_dump cause of multiple declared database??
Next
From: BOUCHPAN-LERUST-JUERY Lionel
Date:
Subject: Re: General ISA and Foreign Key