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"