Re: [HACKERS] trouble with rules - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] trouble with rules
Date
Msg-id m107cgN-000EBPC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to trouble with rules  (Erich Stamberger <eberger@gewi.kfunigraz.ac.at>)
List pgsql-hackers
>
> Hi!
>
> 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.
>         This probably means the backend terminated abnormally before or
> while processing the request.
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.
>
>
> OS = Linux 2.0.35, gcc 2.7.2.3, postgreSQL-6.4.2

    That's  courios.  I  can't  reproduce  it with v6.4 or v6.4.2
    (Linux 2.1.88, gcc 2.7.2.1). Did the checks with the  release
    tarballs,  not with the REL_6_4 tree (will check that later).

    But with the current development tree I  get  a  parse  error
    near delete!

    I  recall  that  there was something done in the parser about
    parantheses around queries. Have to check it out and if fixed
    add  multiple action rules with parantheses to the regression
    test to avoid breakage again in the future.


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 by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] Small patches in copy.c and trigger.c
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] READ COMMITTED isolevel is implemented ...