Received: from serv1.ilse.nl (serv1.ilse.nl [212.189.131.11]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2P0vEw36109 for ; Sat, 24 Mar 2001 19:57:14 -0500 (EST) (envelope-from mathijs@serv0.ilse.nl) Received: from serv0.ilse.nl (intra.ilse.nl [10.1.8.249]) by serv1.ilse.nl (8.11.0/8.10.2) with ESMTP id f2P0v6X01468; Sun, 25 Mar 2001 01:57:06 +0100 (MET) Received: (from mathijs@localhost) by serv0.ilse.nl (8.11.1/8.11.1) id f2P0v5u46228; Sun, 25 Mar 2001 01:57:05 +0100 (CET) (envelope-from mathijs) Date: Sun, 25 Mar 2001 01:57:04 +0100 From: Mathijs Brands To: Tom Lane Cc: pgsql-sql@postgresql.org Subject: Re: all views in database broken at once Message-ID: <20010325015704.A46087@ilse.nl> References: <10008.985481400@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <10008.985481400@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Sat, Mar 24, 2001 at 07:50:00PM -0500 X-Unexpected-Header: The Spanish Inquisition X-Archive-Number: 200103/484 X-Sequence-Number: 2155 On Sat, Mar 24, 2001 at 07:50:00PM -0500, Tom Lane allegedly wrote: > Andrew Perrin 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)