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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

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