From: Tom Lane <tgl@sss.pgh.pa.us>
To: kashi@fhpg.net
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #9366: Default MAXVALUE is incorrect for sequence object of serial type
Date: Thu, 27 Feb 2014 02:02:43 -0500
Message-ID: <19374.1393484563@sss.pgh.pa.us> (raw)
In-Reply-To: <20140227034510.26578.68200@wrigleys.postgresql.org>
References: <20140227034510.26578.68200@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
kashi@fhpg.net writes:
> When I create the new table as serial type column , I found a strange
> condition on sequence parameter.
> It could be specified as integer, but MAXVALUE of sequence is set as
> Bigint.
This is not a bug, but intentional behavior. See
http://www.postgresql.org/message-id/flat/E1VeK8A-0006V4-EX@wrigleys.postgresql.org#E1VeK8A-0006V4-E...> At that case, MAXVALUE of test_int_seq_int_seq is "9223372036854775807". As
> the result, if the current value is 2147483647, next insert operation could
> be failed as "ERROR: integer out of range".
So? If we set the sequence limit differently, the case would still fail,
just with a different error message. And you'd then have two things to
fix, not only one, to get your database back in working order.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, kashi@fhpg.net
Subject: Re: BUG #9366: Default MAXVALUE is incorrect for sequence object of serial type
In-Reply-To: <19374.1393484563@sss.pgh.pa.us>
References: <20140227034510.26578.68200@wrigleys.postgresql.org> <19374.1393484563@sss.pgh.pa.us>
* 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