Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 68D389FB822 for ; Wed, 10 Oct 2007 16:03:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26809-01-5 for ; Wed, 10 Oct 2007 16:03:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by postgresql.org (Postfix) with ESMTP id 8E0AA9FB719 for ; Wed, 10 Oct 2007 16:02:24 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.13.8/8.13.8) with ESMTP id l9AJ2LSQ080556 for ; Wed, 10 Oct 2007 19:02:21 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.13.8/8.13.8/Submit) id l9AJ2Lbn080555; Wed, 10 Oct 2007 19:02:21 GMT (envelope-from www) Date: Wed, 10 Oct 2007 19:02:21 GMT Message-Id: <200710101902.l9AJ2Lbn080555@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #3668: type error in serial From: "Eric Weimer" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/68 X-Sequence-Number: 18466 The following bug has been logged online: Bug reference: 3668 Logged by: Eric Weimer Email address: eweimer@thelocalphonecompany.net PostgreSQL version: 8.1 Operating system: Linux Description: type error in serial Details: Creating a table with a column of type serial causes the creation of a sequence tied as the default value for the column. The actual type of the column is integer, however the sequence created is of type bigint. If the sequence is created as a bigint, then the column should also be defined as bigint. Example: dev=# create temp table testing (id serial); NOTICE: CREATE TABLE will create implicit sequence "testing_id_seq" for serial column "testing.id" CREATE TABLE dev=# \d testing_id_seq Sequence "pg_temp_1.testing_id_seq" Column | Type ---------------+--------- sequence_name | name last_value | bigint increment_by | bigint max_value | bigint min_value | bigint cache_value | bigint log_cnt | bigint is_cycled | boolean is_called | boolean dev=# \d testing Table "pg_temp_1.testing" Column | Type | Modifiers --------+---------+------------------------------------------------------ id | integer | not null default nextval('testing_id_seq'::regclass)