Datatype SERIAL incorrectly interpreted

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Datatype SERIAL incorrectly interpreted
Date: 2001-03-28 16:37:52
Message-ID: 200103281637.f2SGbq236999@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hubert Hafner (dogart(at)iname(dot)com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Datatype SERIAL incorrectly interpreted

Long Description
If you create a table with more than 1 SERIAL, only for the last a sequence is created by PostgreSQL. The other fields only set to INTEGER, but there is no sequence for.

Sample Code
CREATE TABLE Example (Field1 SERIAL, Field2 SERIAL);

PostgreSQL would generate:
Table Example:
Field1 as INTEGER NOT NULL DEFAULT nextval(Field1_Example_seq)
Field2 as INTEGER NOT NULL DEFAULT nextval(Field2_Example_seq)

But only Field2_Example_seq really exits!

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-03-28 18:39:14 Re: Datatype SERIAL incorrectly interpreted
Previous Message Tom Lane 2001-03-28 16:00:04 Re: 7.0.3 max function