serial data type - Mailing list pgsql-general

From Omid Mahboubi
Subject serial data type
Date
Msg-id 1035.203.27.92.188.1039571108.ozinbox@ozinbox.oztralia.com
Whole thread Raw
List pgsql-general
Hi all,

When creating a field of type SERIAL, the default values for the
sequence created are max_value=9223372036854775807 and min_value=1
but the field type created in the table will be int4(-2147483648 to
+2147483647).

I was wondering if this would cause any problems since only positive
numbers upto 2147483647 would be used in the int4 field, but the
sequence keeps on auto-incrementing to values above that limit.

Are there any advantages if I implicitly set max_value=2147483647?

I would appreciate any help regarding this issue.

Thanks in advance,
Omid




pgsql-general by date:

Previous
From: Markus Jais
Date:
Subject: Re: Postgresql and Ruby - any opensource software done
Next
From: Doug Fields
Date:
Subject: Urgent need of (paid) PostgreSQL support in New York City area