Re: [HACKERS] create rule changes table to view ? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] create rule changes table to view ?
Date
Msg-id Pine.LNX.4.10.9907121443580.4521-100000@saxony.pathwaynet.com
Whole thread Raw
In response to Re: [HACKERS] create rule changes table to view ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] create rule changes table to view ?
Re: [HACKERS] create rule changes table to view ?
Re: [HACKERS] create rule changes table to view ?
Re: [HACKERS] create rule changes table to view ?
List pgsql-hackers
On Mon, 12 Jul 1999, Tom Lane wrote:

> Ryan Bradetich <rbrad@hpb50023.boi.hp.com> writes:
> > psql declares the the type to be view? if the relkind is a relation
> > and the relhasrules = true in pg_class for that entry.  I will pull
> > the latest source and see if I can come up with a better way for
> > determining the type tomorrow, if someone else doesn't beat me to it
> 
> The way Jan explained it to me, a view *is* a table that happens to
> have an "on select do instead" rule attached to it.  If the table
> has data in it (which it normally wouldn't) you can't see that data
> anyway because of the select rule.

Does anyone else see a problem with this? This sort of approach almost
prevents views with distinct, union, order by, etc. from ever being
implemented.

I don't know what other people use their views for but I use them to store
complicated queries. So, in essence it would suffice to store the text of
the query with a view rather than faking tables for it, thus confusing all
sorts of utility programs.

Then again, I'd be interested to know what to developers' idea of normal
usage of a view is.


-- 
Peter Eisentraut
PathWay Computing, Inc.



pgsql-hackers by date:

Previous
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] create rule changes table to view ?
Next
From: Uncle George
Date:
Subject: Postgres Alpha Port On RH6.0