Search Postgresql Archives

alter views

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

 



A couple months ago, I posted a function that allows a user to alter views
with dependencies.
I recently discovered another quick way to do it and thought I would share
it with the community.

1) Cretae a new view
2) Modify the dependent views to utilize the new view
3) drop the old view
4) rename the new view with the same name as the old view using alter table
viewname rename to newname

The views that referenced the newname automatically switch their reference
to the new name.
This is better for people who are uncomfortable with a function that first
drops the dependency list and then rebuilds them one at a time.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[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