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

From: wieck(at)debis(dot)com (Jan Wieck)
To: peter_e(at)gmx(dot)net (Peter Eisentraut)
Cc: maillist(at)candle(dot)pha(dot)pa(dot)us, oleg(at)sai(dot)msu(dot)su, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] create rule changes table to view ?
Date: 1999-09-25 13:01:17
Message-ID: m11UrS1-0003kLC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:

> A fix would be to display both tables and views as "relation". As far as I
> know there is now 100% deterministic way to tell a table from a view. I
> think one fine day Jan is going to change that but for now we don't have
> to worry about it.

There is currently a 100% failsafe way.

Actually, rules ON SELECT are totally restricted to rules
that are INSTEAD, return a targetlist that's exactly the
relations (views) schema and there could only be one single-
action rule on the SELECT event. These checks are performed
during CREATE RULE.

In short: If there's a rule ON SELECT, then the relation MUST
BE A VIEW.

The detail psql is doing wrong is that it treats any rule as
if it is indicating a view. It must look for SELECT rules
only.

And I'm not planning to take out this restriction again.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Leon 1999-09-25 15:14:45 Profiling?
Previous Message Michael Simms 1999-09-24 18:42:56 Re: Frustrated