Skip site navigation (1) Skip section navigation (2)

Rename sequence bug/feature

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Rename sequence bug/feature
Date: 2002-02-26 20:37:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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;
helpdesk=# alter table dog rename to cat;
helpdesk=# select sequence_name from cat;
(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

Next:From: Colin FaberDate: 2002-02-26 20:40:21
Subject: Re: PostgreSQL 8.0 ??
Previous:From: Zak GreantDate: 2002-02-26 20:30:41
Subject: eWeek Poll: Which database is most critical to your organization?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group