index problem when renaming a table

From: "lists" <lists(at)insyde(dot)com(dot)br>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: index problem when renaming a table
Date: 2003-04-04 13:53:25
Message-ID: 009d01c2fab1$90d48f40$80faabc8@insyde
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi ,

I used the command:

ALTER TABLE TEST_TABLE RENAME TO TEST_TABLE_01;

and tried to create a new one, based on the old, with some more fields.
But when I create the primary key, it says that it's name is already used
and it can't be dome, and exits.

Then I have to drop the old table's index, recreate it and create the new
table again. Isn't it a bug? Why can't I have the same name in 2 or more
tables in the same database? Or why PostgreSQL don't create a PK with
some random name (say PK_TBL01_1234) to each table so the index
name won't be duplicated?

TIA,
Ricardo.

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2003-04-04 14:50:41 Re: [BUGS] Rapid deteriation of performance (might be caused by
Previous Message thomas.f 2003-04-04 12:32:19 pgsqlodbc rsp installation fails