Notify with Rules bugs?

Поиск
Список
Период
Сортировка
От sergiop@sinectis.com.ar
Тема Notify with Rules bugs?
Дата
Msg-id 200012291958.QAA15000@sinectis.com
обсуждение исходный текст
Список pgsql-patches
Hi!

I compiled the 7.1 version of the snapshot dated on the December 18 (on i386
Linux Red Hat 6.1).
Using the notify in the rule actions I get some errors and I suppose they are
bugs.

The first one when the rule is triggered:

[postgres@ postgres]$ createdb test
CREATE DATABASE

test=# create table test_notify(one int);
CREATE

test=# create rule i_test_notify as on insert to test_notify do notify ONE;
CREATE

test=# insert into test_notify values (1);
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#


The second one (exactly, this is not a bug) when I try to see the rule
definition.

test=# select * from pg_rules;
ERROR:  get_ruledef of i_test_notify: query command type 5 not implemented yet


Finally, when a dump of the database is performed:

[postgres@ postgres]$ pg_dump test > test.pgdump
dumpRules(): SELECT failed for rules associated with table "test_notify".
        Explanation from backend: 'ERROR:  get_ruledef of i_test_notify: query
command type 5 not implemented yet
'.

This error is produced in the same way as in the previous case but in this
case, there is an additional problem since the dump aborts.

Within the patch I attach, you can find the solution for these problems:

To solve the first error the function gatherRewriteMeta in RewriteHandler.c was
modified

To solve the second and third errors the function get_utility_query_def in
ruleutils.c was added. The function get_query_def in ruleutils.c was modified
as well.


Would someone like to review it?

Thnaks.

Sergio.
Вложения

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

Предыдущее
От: Ryan Kirkpatrick
Дата:
Сообщение: Re: [HACKERS] Re: Tuple-valued datums on Alpha (was Re: 7.1 on DEC/Alpha)
Следующее
От: "oj"
Дата:
Сообщение: Re: sql -> xls or dbf