Skip site navigation (1) Skip section navigation (2)

Re: create or replace rule/view (fwd)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Rod Taylor <rbt(at)zort(dot)ca>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>,PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: create or replace rule/view (fwd)
Date: 2002-08-29 00:28:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> Rod Taylor <rbt(at)zort(dot)ca> writes:
>> REPLACE VIEW shouldn't change the visible structure at all.  It defeats
>> the purpose.

> So what changes to the view should be allowed?

You can redefine the query that supports the view.  You cannot add,
remove, rename, or change the datatypes of any columns of the view.

It occurs to me that we have similar problems if one does ALTER TABLE on
a table or composite type that is being used as a function argument or
result type.  Possibly we could check for this by looking to see if
there are any dependencies recorded against the table's pg_type row.

			regards, tom lane

In response to


pgsql-patches by date

Next:From: Bruce MomjianDate: 2002-08-29 01:15:10
Subject: Re: [HACKERS] fix for palloc() of user-supplied length
Previous:From: Matthew T. O'ConnorDate: 2002-08-29 00:15:03
Subject: Re: [HACKERS] fix for palloc() of user-supplied length

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group