From: Eric Weimer <eweimer@thelocalphonecompany.net>
To: pgsql-bugs@postgresql.org
Subject: BUG #3668: type error in serial
Date: Wed, 10 Oct 2007 19:02:21 GMT
Message-ID: <200710101902.l9AJ2Lbn080555@wwwmaster.postgresql.org> (raw)
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: eweimer@thelocalphonecompany.net
Subject: Re: BUG #3668: type error in serial
In-Reply-To: <200710101902.l9AJ2Lbn080555@wwwmaster.postgresql.org>
References: <200710101902.l9AJ2Lbn080555@wwwmaster.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox