Re: all views in database broken at once

From: Mathijs Brands <mathijs(at)ilse(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: all views in database broken at once
Date: 2001-03-25 00:57:04
Message-ID: 20010325015704.A46087@ilse.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sat, Mar 24, 2001 at 07:50:00PM -0500, Tom Lane allegedly wrote:
> Andrew Perrin <aperrin(at)socrates(dot)berkeley(dot)edu> writes:
> > But I'm intrigued: what is it that causes this? Is it *my*
> > recreating the view on which the other views depend,
>
> Yes. You dropped and recreated the view --- the new version may have
> the same name but it's not the same OID, so it isn't the same object.
> And the other views refer to it by OID.
>
> The ultimate solution should have two parts, IMHO:
>
> 1. Dependency checking so that you *can't* drop a view that is still
> referenced. However this will not be complete --- it's not clear that
> we can detect references inside PL functions, for example.
>
> 2. An ALTER VIEW command that lets you change a view's defining query,
> while keeping the same OID, as long as the names and types of the output
> columns don't change. This would reduce the need to drop and recreate
> views.

How about being able to recompile them (keeping the SQL around in the
system catalogs)? Doesn't Oracle allow you to do something like that?

Mathijs
--
"It is a great thing to start life with a small number of really good books
which are your very own".
Sir Arthur Conan Doyle (1859-1930)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dan Lyke 2001-03-25 02:28:08 Re: Serials.
Previous Message Tom Lane 2001-03-25 00:50:00 Re: all views in database broken at once