Обсуждение: Bug?

Поиск
Список
Период
Сортировка

Bug?

От
Paul
Дата:
Sequence:
-------------------------------------------------------------
listen xxx;
create table xx (a int4);
create rule xx_xx2 as on delete to xx where old.a=1 do notify xxx;
-------------------------------------------------------------

Output:
something like "backend closed connection"

Output I expected:
at least some error message, but not closing of connection.
I know that my SQL sequence is wrong, but i just expected the error
message.

PostgreSQL version:
7.1.1

Platform information:
Linux Slackware 7.1, kernel 2.4.1

--
Best regards,
 Paul                          mailto:magamos@mail.ru

Re: Bug?

От
Tom Lane
Дата:
Paul <magamos@mail.ru> writes:
> create rule xx_xx2 as on delete to xx where old.a=1 do notify xxx;

I see it too.  Will investigate.

            regards, tom lane

Re: Bug?

От
Tom Lane
Дата:
Paul <magamos@mail.ru> writes:
> create table xx (a int4);
> create rule xx_xx2 as on delete to xx where old.a=1 do notify xxx;
> something like "backend closed connection"

Okay, the problem here is that we don't support NOTIFY (or other utility
statements) in conditional rules.  This isn't likely to change soon.
I agree it shouldn't crash though; will fix that.

Consider using a trigger to do the notify, instead.

            regards, tom lane