sequence havn't been dropped. - Mailing list pgsql-bugs

From Bhuvan A
Subject sequence havn't been dropped.
Date
Msg-id Pine.LNX.4.20.0203141034230.31828-100000@Larry
Whole thread Raw
Responses Re: sequence havn't been dropped.  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
hi,

Hope you might have came accross this problem earlier. it exists in
7.1.x and 7.2 as well.

while creating a table with a column of type 'serial', well a sequence
has been created and the default value of that field is set to nextval
of that sequence, fine. But while dropping that table, why aren't that
sequence dropped?

example:

bhuvandb=# CREATE TABLE seq_test (id serial, name text);
NOTICE:  CREATE TABLE will create implicit sequence 'seq_test_id_seq'
for SERIAL column 'seq_test.id'
NOTICE:  CREATE TABLE/UNIQUE will create implicit index
'seq_test_id_key' for table 'seq_test'
CREATE

bhuvandb=# DROP TABLE seq_test ;
DROP

bhuvandb=# CREATE TABLE seq_test (id serial, name text);
NOTICE:  CREATE TABLE will create implicit sequence 'seq_test_id_seq'
for SERIAL column 'seq_test.id'
NOTICE:  CREATE TABLE/UNIQUE will create implicit index
'seq_test_id_key' for table 'seq_test'

ERROR:  Relation 'seq_test_id_seq' already exists

hope, developers would have their own reasons. but wish to know
that. thats it.

Regards,
Bhuvaneswaran.

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: referential constraint bug
Next
From: Peter Eisentraut
Date:
Subject: Re: sequence havn't been dropped.