Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6D20B6349C8; Wed, 17 Feb 2010 15:48:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49823-05; Wed, 17 Feb 2010 19:47:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zql.com (3a.1f.de.static.xlhost.com [206.222.31.58]) by mail.postgresql.org (Postfix) with ESMTP id 92FE1683A10; Wed, 17 Feb 2010 14:04:15 -0400 (AST) Received: from localhost ([127.0.0.1]) by zql.com with smtp (Exim 4.68) (envelope-from ) id 1NhoFy-0007vh-EW; Wed, 17 Feb 2010 13:04:14 -0500 From: "Greg Sabino Mullane" To: pgsql-hackers@postgresql.org Cc: pgsql-interfaces@postgresql.org CC: pgsql-interfaces@postgresql.org Subject: Re: [HACKERS] Listen/Notify payload and interfaces X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: Date: Wed, 17 Feb 2010 18:04:14 -0000 X-Mailer: JoyMail 2.4.0 Message-ID: <06fb833dde8748d07bb996c39d221bd8@biglumber.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/1 X-Sequence-Number: 6896 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 > With the new listen/notify implementation we can send a payload along > with the notification. This has been in the protocol already since > years and there is no change needed for libpq. However we need to > adapt the various interfaces to allow a payload to be sent and > received. DBD::Pg has been ready since 2008, if you need something to test with. :) Usage is: while (my $notify = $dbh->pg_notifies) { my ($name, $pid, $payload) = @$notify; print qq{I received notice "$name" from PID $pid, payload was "$payload"\n}; } Not sure what you mean by adapting interfaces to send payloads, I imagine most if not all simply require a NOTIFY to be sent via PQexec. - -- Greg Sabino Mullane greg@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201002171302 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAkt8L3oACgkQvJuQZxSWSsik0wCfZexc8ZU2/zo4JZQ47YblKend yEMAoLdG4IS3pc163UVSpQ11/de+xzUT =dx6+ -----END PGP SIGNATURE-----