BUG #3668: type error in serial

From: "Eric Weimer" <eweimer(at)thelocalphonecompany(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3668: type error in serial
Date: 2007-10-10 19:02:21
Message-ID: 200710101902.l9AJ2Lbn080555@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 3668
Logged by: Eric Weimer
Email address: eweimer(at)thelocalphonecompany(dot)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)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-10-10 19:57:21 Re: BUG #3667: Job scheduling with Greenplum fails
Previous Message Jon Roberts 2007-10-10 17:14:42 BUG #3667: Job scheduling with Greenplum fails