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: 24931.1030580899@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-patches by date

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