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

Поиск
Список
Период
Сортировка
От wieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] create rule changes table to view ?
Дата
Msg-id m11UrS1-0003kLC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] create rule changes table to view ?  (Peter Eisentraut <peter_e@gmx.net>)
Список 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@debis.com (Jan Wieck) #

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Simms
Дата:
Сообщение: Re: Frustrated
Следующее
От: Leon
Дата:
Сообщение: Profiling?