Search Postgresql Archives

Renaming tables and their indexes simultaneously

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a stored procedure that renames a table as part of a partitioning scheme, then re-creates it.
Up until recently (I'm not sure what changed), renaming the table would cause the pkey index/constraint, as well as all other indexes, to be renamed according to the new table name.
However, they now do not rename, and cause collisions when the new table is created.

I would prefer not having to drop and re-create the primary key index, as it takes quite a while to drop and re-create an index that large.

How can I cause Postgres to rename the table's attached indexes when I rename the table, and what might have caused it to stop doing so recently?

We are on Postgres 9.1, but we did not recently upgrade...

Thanks.

--
Moshe Jacobson
Nead Werx, Inc. | Senior Systems Engineer
2323 Cumberland Parkway, Suite 201 | Atlanta, GA 30339
moshe@xxxxxxxxxxxx | 
www.neadwerx.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux