sequence havn't been dropped.

From: Bhuvan A <bhuvansql(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: sequence havn't been dropped.
Date: 2002-03-14 05:11:21
Message-ID: Pine.LNX.4.20.0203141034230.31828-100000@Larry
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2002-03-14 05:53:20 Re: sequence havn't been dropped.
Previous Message Peter Eisentraut 2002-03-13 23:06:16 Re: Case sensitive table names ?