LISTEN/NOTIFY Test

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема LISTEN/NOTIFY Test
Дата
Msg-id 4B8415A2.2070704@agliodbs.com
обсуждение исходный текст
Список pgsql-testers
[TEST REPORT]

[Release]: 9.0 Alpha 4

[Test Type]: Feature Test

[Test]: LISTEN/NOTIFY

[Platform]: OSX 10.5 Intel 32-bit compile

[Parameters]: --with-perl

[Failure]: No.

[Results]: Was able to LISTEN to notifications sent by trigger.

[Comments]: Created a pgbench database.  Added a NOTIFY trigger to
pgbench_history to send notifications of new rows with a payload of tid.
 Set up local listener which received notifications.

create or replace function notify_new_history ()
returns trigger
language plpgsql
as $f$
BEGIN

PERFORM pg_notify('new_history',NEW.tid::TEXT);

return NEW;
END; $f$;

create trigger new_history AFTER INSERT OR UPDATE ON pgbench_history
for each row execute procedure notify_new_history();

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Streaming Replication Test
Следующее
От: Mario Splivalo
Дата:
Сообщение: Postgres 9.0alpha4?