Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VeSz0-00076Q-T8 for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2013 17:03:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VeSz0-0001KX-6s for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2013 17:03:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VeK8K-0002hU-H4 for pgsql-bugs@postgresql.org; Thu, 07 Nov 2013 07:36:04 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VeK8H-0001Vw-Bv for pgsql-bugs@postgresql.org; Thu, 07 Nov 2013 07:36:04 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VeK8F-0002c7-Ti for pgsql-bugs@postgresql.org; Thu, 07 Nov 2013 07:36:00 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1VeK8A-0006V4-EX for pgsql-bugs@postgresql.org; Thu, 07 Nov 2013 07:35:54 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: BUG #8582: field serial getted incorrect value from automaticaly created its sequence To: pgsql-bugs@postgresql.org From: evgeniy.skomorokhov@gmail.com Message-Id: Date: Thu, 07 Nov 2013 07:35:54 +0000 X-Pg-Spam-Score: -1.0 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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