Re: SERIAL datatype, int or bigint?

From: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
To: Rob Hoopman <rob(at)tuna(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SERIAL datatype, int or bigint?
Date: 2002-03-08 00:13:12
Message-ID: 1015546392.19014.9.camel@jiro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2002-03-07 at 17:24, Rob Hoopman wrote:
> Hi,
> Does anyone know why the serial datatype inserts an int column into a
> table but the max_value for the sequence is a bigint?

In 7.2, sequences generate int64 values. Serial columns are int32 by
default: if you want 64 bit serials, use the "bigserial" or "serial8"
data-type.

Cheers,

Neil

--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2002-03-08 00:53:02 Re: point in time recovery and moving datafiles online
Previous Message David Blood 2002-03-07 23:48:40 how to select a date + column