Re: [HACKERS] create rule changes table to view ?

From: Peter Eisentraut <peter(at)pathwaynet(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] create rule changes table to view ?
Date: 1999-07-12 18:49:05
Message-ID: Pine.LNX.4.10.9907121443580.4521-100000@saxony.pathwaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 12 Jul 1999, Tom Lane wrote:

> Ryan Bradetich <rbrad(at)hpb50023(dot)boi(dot)hp(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Uncle George 1999-07-12 19:27:29 Postgres Alpha Port On RH6.0
Previous Message Jan Wieck 1999-07-12 16:10:52 Re: [HACKERS] create rule changes table to view ?