From: | evgeniy(dot)skomorokhov(at)gmail(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #8582: field serial getted incorrect value from automaticaly created its sequence |
Date: | 2013-11-07 07:35:54 |
Message-ID: | E1VeK8A-0006V4-EX@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 8582
Logged by: Evgeniy Skomorokhov
Email address: evgeniy(dot)skomorokhov(at)gmail(dot)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"
From | Date | Subject | |
---|---|---|---|
Next Message | gladchenkoigor | 2013-11-07 11:30:14 | BUG #8583: I can't install this product |
Previous Message | peeyush.singla | 2013-11-07 07:19:25 | BUG #8581: PG::UndefinedObject: ERROR: type "json" does not exist |