Rename sequence bug/feature - Mailing list pgsql-hackers

From Dave Page
Subject Rename sequence bug/feature
Date
Msg-id FED2B709E3270E4B903EB0175A49BCB104762F@dogbert.vale-housing.co.uk
Whole thread Raw
Responses Re: Rename sequence bug/feature  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I noticed in a post recently that it was possible to rename objects other
than tables in pg_class using ALTER TABLE RENAME. I've now implemented this
in pgAdmin II for views, sequences and indexes.

Today I've had cause to dump my test database and found a minor problem:

dumping database "helpdesk"...
pg_dump: query to get data of sequence "cat" returned name "dog"
pg_dump failed on helpdesk, exiting

This can be recreated easily:

helpdesk=# create sequence dog;
CREATE
helpdesk=# alter table dog rename to cat;
ALTER
helpdesk=# select sequence_name from cat;sequence_name
---------------dog
(1 row)


Regards, Dave.

(now wondering how many responses will say it is a bug and how many will say
a sequence is not a table and I shouldn't be doing that anyway :) )


pgsql-hackers by date:

Previous
From: Colin Faber
Date:
Subject: Re: PostgreSQL 8.0 ??
Next
From: Oliver Elphick
Date:
Subject: Re: COPY incorrectly uses null instead of an empty string