Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Listen/Notify payload and interfaces

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [HACKERS] Listen/Notify payload and interfaces
Date: 2010-02-17 18:04:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-interfaces
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(at)turnstep(dot)com
End Point Corporation
PGP Key: 0x14964AC8 201002171302


In response to


pgsql-hackers by date

Next:From: David E. WheelerDate: 2010-02-17 18:30:03
Subject: Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl
Previous:From: Peter EisentrautDate: 2010-02-17 17:39:12
Subject: Re: codlin_month is up and complain - PL/Python crash

pgsql-interfaces by date

Next:From: David E. WheelerDate: 2010-02-17 20:50:12
Subject: Re: [HACKERS] Listen/Notify payload and interfaces
Previous:From: Joachim WielandDate: 2010-02-17 08:39:18
Subject: Listen/Notify payload and interfaces

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group