Re: how to modify a view

From: Reece Hart <reece(at)harts(dot)net>
To: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
Cc: tech(at)ubilibet(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: how to modify a view
Date: 2008-05-20 19:59:47
Message-ID: 1211313587.6940.70.camel@snafu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2008-05-21 at 02:43 +0930, Shane Ambler wrote:

> Yes - The only way to do it is DROP VIEW... then CREATE VIEW... - the
> catch is any other views that depend on the view you wish to drop.

Tip: It's sometimes useful to rename an existing view or table to
deprecate it. (I use names like _someview_v_20080520.) When you rename a
table or view, the definition of any views which depend on them will be
updated appropriately. This is particularly handy when you have several
layers of views and don't want to break current behavior.

-Reece

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-05-20 20:16:54 Re: best er modeling tool for postgreSQL
Previous Message Peter Petrov 2008-05-20 18:59:43 Corrupted database's files (linux RAID5 + PostgreSQL 8.3.0)