From: evgeniy.skomorokhov@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #8582: field serial getted incorrect value from automaticaly created its sequence
Date: Thu, 07 Nov 2013 07:35:54 +0000
Message-ID: <E1VeK8A-0006V4-EX@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 8582
Logged by: Evgeniy Skomorokhov
Email address: evgeniy.skomorokhov@gmail.com
PostgreSQL version: 9.2.4
Operating system: ubuntu precise 12.04
Description:
Automaticaly created sequence takes values from the range [1;
9223372036854775807] but max value of field which will be filled from
sequence - max of type integer (2147483647).
In PostgreSQL we can set field type "serial" during creting table like:
CREATE TABLE test1(
id serial
);
Then we get table and sequence structure like
/*
NOTICE: CREATE TABLE will create implicit sequence "test1_id_seq" for
serial column "test1.id"
-- Created structures test1 and test1_id_seq:
CREATE TABLE test1
(
id serial NOT NULL
)
WITH (
OIDS=FALSE
);
ALTER TABLE test1
OWNER TO gis;
CREATE SEQUENCE test1_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE test1_id_seq
OWNER TO gis;
*/
And when we insert values to table we can get exception "ERROR: integer out
of range"
--
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: evgeniy.skomorokhov@gmail.com
Subject: Re: BUG #8582: field serial getted incorrect value from automaticaly created its sequence
In-Reply-To: <E1VeK8A-0006V4-EX@wrigleys.postgresql.org>
References: <E1VeK8A-0006V4-EX@wrigleys.postgresql.org>
* 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