Bug #755: Error on create a new sequence by using the create table command. - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #755: Error on create a new sequence by using the create table command.
Date
Msg-id 20020903203130.A228D47607D@postgresql.org
Whole thread Raw
Responses Re: Bug #755: Error on create a new sequence by using the create
Re: Bug #755: Error on create a new sequence by using the
List pgsql-bugs
Søren Laursen (sl@scrooge.dk) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Error on create a new sequence by using the create table command.

Long Description
In postgresql 7.1 and 7.2.1:

Then using a statement like:
CREATE TABLE longtablename(
longtablenamenr serial NOT NULL UNIQUE PRIMARY KEY,....

)

and later a
CREATE TABLE longtablenamestep(
longtablenamestepnr serial NOT NULL UNIQUE PRIMARY KEY,....

)

I get an error on creating the last table. This is because the new sequence is named with the same name as the one used
bythe first table. The create statement is then terminated and no table is created. I would have to create the sequence
myself and then create the table using statements like: 
 not null default nextval('"longtablename_longtablename_sq1"'::text).

Regards,

Soeren Laursen


Sample Code


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: bug in contrib/contrib-global.mk
Next
From: Bruce Momjian
Date:
Subject: Re: Bug #755: Error on create a new sequence by using the create