* Tom Lane ([EMAIL PROTECTED]) wrote: > Stephen Frost <[EMAIL PROTECTED]> writes: > > test=> create table a ( > > test(> b int primary key > > test(> ); > > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a_pkey" for= > > table "a" > > CREATE TABLE > > test=> alter table a rename to c; > > ALTER TABLE > > test=> alter index a_pkey rename to c_pkey; > > ALTER INDEX > > Arguably we should forbid ALTER INDEX RENAME on an index that belongs to > a constraint, and make you rename the constraint instead (and have that > implicitly change the index name too).
That would work too, though I don't think you can just rename a
constraint. You have to drop/add it, which means dropping and then
adding the index back it looks like, which kind of sucks if it's a big
table (one reason I wasn't just dropping/recreating the table in the
first place). This was on 8.0.3; can you rename constraints w/ 8.1? If
so, and if that's made to implicitly change the index name, I'd be
happy.
Thanks,
Stephen
signature.asc
Description: Digital signature
