Re: Possible enhancement : replace view ?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Emmanuel Charpentier <charpent(at)bacbuc(dot)dyndns(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible enhancement : replace view ?
Date: 2002-08-14 03:34:28
Message-ID: 200208140334.g7E3YSa25198@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Ah, that's why it wasn't in my mailbox. Gavin,

http://groups.google.com/groups?hl=en&lr=&ie=ISO-8859-1&q=replace+view+gavin&btnG=Google+Search&meta=group%3Dcomp.databases.postgresql.*

Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> It passes all regression tests. There's only one really sketchy part of
> the patch: UpdateAttributeTuples(). This routine is fairly dangerous since
> it simply removes a given relid's pg_attribute entries and creates a new
> set basic on a given TupleDesc. Naturally, it is only useful for views.

You can NOT allow CREATE OR REPLACE VIEW to change the tupledesc of the
view, so I stopped reading right here --- take it out and install
prevention instead. Why do you think that REPLACE VIEW is interesting?
It's so you can modify a view without breaking things that depend on it
... and things that depend on it depend on the tupledesc. This is
exactly analogous to not allowing REPLACE FUNCTION to change the return
type of the function.

regards, tom lane
---------------------------------------------------------------------------

Tom Lane wrote:
> Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> > I submitted a patch for this a few days ago. Did it not hit pgsql-patches?
>
> It did ... I had some gripes about it ... I thought you were working on
> the gripes?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-14 03:36:04 Re: [SQL] 16 parameter limit
Previous Message Tom Lane 2002-08-14 03:32:59 Re: Temporary Views