Re: [HACKERS] trouble with rules

Поиск
Список
Период
Сортировка
От jwieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] trouble with rules
Дата
Msg-id m109a4t-000EBPC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] trouble with rules  (jwieck@debis.com (Jan Wieck))
Ответы Re: [HACKERS] trouble with rules  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] trouble with rules  (Michael Meskes <Michael_Meskes@topmail.de>)
Список pgsql-hackers
> > > > can somebody see this too?
> > > >
> > > > create table t1(i1 int4);
> > > > create table t2(i1 int4);
> > > > create table t3(i2 int4);
> > > >
> > > > test=> create rule rm_t1 as on delete to t1
> > > > test-> do ( delete from t2 where old.i1 = i1;
> > > > test->      delete from t3 where old.i1 = i2;);
> > > > pqReadData() -- backend closed the channel unexpectedly.
>
>     Now  have  to  look who damaged the parser in CURRENT not any
>     longer accepting parentheses for mutiple action rules.

    Has been commented out when INTERSECT came.

    Fixed in CURRENT. I hate to but I have to comment on this:

        Beeing  able  to  put  multiple  actions  for  rules into
        parentheses has been added and RELEASED  with  v6.4.  And
        this  syntax  is  documented in the programmers manual of
        v6.4.

        It wasn't hard to reenable it. I just told gram.y that  a
        SelectStmt  cannot occur in a multiple rule action block.
        It looks to me, that  it  was  taken  out  only  to  move
        INTERSECT in the easy way.  But this time the easy way is
        IMHO the wrong way.

        Removing a documented, released feature is something that
        causes  havy  trouble  for those who want to upgrade to a
        new version.

        Next time  please  keep  existing  syntax/features  until
        there  is an agreement of the developers team that it has
        to die.

    BTW: There is 1 shift/reduce conflict in  gram.y  (was  there
    before I fixed multi action rules). Who introduced that?


Jan

--

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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Oops, I seem to have changed UNION's behavior
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] One I've never seen before: