lundi 29 décembre 2014

Postgresql Rename Table without Updating View Definitions


I've found out today that renaming tables in Postgresql also renames the VIEW definitions for Views that use the table I renamed automatically? Is there any way to turn this off?


So I rename the table with:



ALTER TABLE xyz RENAME TO abc;


And my VIEW defition for the sake of example is:



CREATE VIEW foo AS SELECT * FROM xyz;


Next thing I know after I rename the table, the definition for foo has changed to point to table abc.


I'm using Postgresql 8.4





Aucun commentaire:

Enregistrer un commentaire