From: Josh Berkus <josh@agliodbs.com>
To: pgsql-testers@postgresql.org
Subject: LISTEN/NOTIFY Test
Date: Tue, 23 Feb 2010 09:51:30 -0800
Message-ID: <4B8415A2.2070704@agliodbs.com> (raw)
[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();
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-testers@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: LISTEN/NOTIFY Test
In-Reply-To: <4B8415A2.2070704@agliodbs.com>
References: <4B8415A2.2070704@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox