Re: This script will crash the connection

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <janwieck(at)Yahoo(dot)com>, Steve Howe <howe(at)carcass(dot)dhs(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: This script will crash the connection
Date: 2001-01-27 05:40:23
Message-ID: 200101270540.AAA13414@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > OK, added to TODO:
> > * Allow NOTIFY in rules
> >>
> >> Uh, what does that have to do with the problem? It's certainly not
> >> an accurate rendering of either the current or proposed status ...
>
> > Oops, can you give me a line. What was the issue?
>
> "Allow NOTIFY in conditional rules" would be an approximation. It's
> not the whole story though, because presently we also have to fail
> if the rule is applied to a query with conditions, even if the rule
> itself is unconditional. As of my last commit:
>
> regression=# create rule r1 as on update to int4_tbl do notify foo;
> CREATE
> regression=# update int4_tbl set f1 = f1;
> UPDATE 5
> regression=# update int4_tbl set f1 = f1 where f1 < 0;
> ERROR: Conditional NOTIFY is not implemented
>
> which is pretty ugly but at least it doesn't pretend to do something
> it can't, which was the 7.0 behavior. (In 7.0 you'd have gotten a
> NOTIFY whether the update updated any rows or not.)

Added to TODO:

* Allow NOTIFY in rules involving conditionals

This covers both cases of conditionals in the rule or the query.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-01-27 05:43:52 Open 7.1 items
Previous Message Tom Lane 2001-01-27 05:31:19 Re: This script will crash the connection