Re: when does CREATE VIEW not create a view?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Cc: t-ishii(at)sra(dot)co(dot)jp, pgsql-hackers(at)hub(dot)org
Subject: Re: when does CREATE VIEW not create a view?
Date: 2000-08-29 22:38:27
Message-ID: 13777.967588707@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Ross J. Reedstrom" <reedstrm(at)rice(dot)edu> writes:
> Only problem is in utils/adt/ruleutils.c

> There's code in there that constructs potential rule names that start with
> '_ret' as well as '_RET', in order to use an SPI query to find the rule
> associated with a view. This is the only occurance of the string '"_ret'
> in the codebase, and I can't find a way a rule might get that name, nor an
> example in either the 6.5.0 and 7.0.2 databases I've got here.

Most likely it's dead code. I'd say simplify.

Mark Hollomon's question about adding a relisview column to pg_class
spurs another possibility: add a column to pg_class, but instead of
just a boolean, make it be 0 if not a view and the OID of the view rule
if it is. That'd get rid of the dependency on rule names altogether
for code that needs to find the associated rule.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-08-29 22:58:41 Re: [HACKERS] disallow LOCK on a view - the Tom Lane remix
Previous Message Martin A. Marques 2000-08-29 21:14:22 new in list

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2000-08-29 22:58:41 Re: [HACKERS] disallow LOCK on a view - the Tom Lane remix
Previous Message Mark Hollomon 2000-08-29 19:16:12 disallow LOCK on a view - the Tom Lane remix