Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 64C3F63777A for ; Tue, 23 Feb 2010 13:51:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 82673-09 for ; Tue, 23 Feb 2010 17:51:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [69.36.227.170]) by mail.postgresql.org (Postfix) with ESMTP id 9EBDC633727 for ; Tue, 23 Feb 2010 13:51:29 -0400 (AST) Received: from dsl081-245-111.sfo1.dsl.speakeasy.net ([64.81.245.111] helo=Sidney-Stratton.local) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1Njyus-0004cz-J4 for pgsql-testers@postgresql.org; Tue, 23 Feb 2010 09:51:28 -0800 Message-ID: <4B8415A2.2070704@agliodbs.com> Date: Tue, 23 Feb 2010 09:51:30 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: pgsql-testers@postgresql.org Subject: LISTEN/NOTIFY Test Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.927 tagged_above=-10 required=5 tests=AWL=-0.742, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201002/8 X-Sequence-Number: 37 [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();