pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Clemens Eisserer <linuxhippy@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Client-Side triggers possible?
Date: Thu, 30 Dec 2010 17:32:32 +1100
Message-ID: <4D1C2780.4030603@postnewspapers.com.au> (raw)
In-Reply-To: <AANLkTi=Sj8XyH8hqOy8dF64kUHcHh53x+w8UoY+x6aKd@mail.gmail.com>
References: <AANLkTinPZA4Ym66zgKppbAUiHu0o1GqbHtOoUB12huEZ@mail.gmail.com>
	<4D185A5A0200002500038BB1@gw.wicourts.gov>
	<AANLkTi=Sj8XyH8hqOy8dF64kUHcHh53x+w8UoY+x6aKd@mail.gmail.com>

On 12/28/2010 02:27 AM, Clemens Eisserer wrote:
> Hi,
>
>> you should take a look at that :
>> http://jdbc.postgresql.org/documentation/83/listennotify.html
>
> Thanks that was exactly what I was looking for :)
> Unfourtunatly there's still polling required, it seems the jdbc driver
> has to issue requests in order to get the notifications.

Actually, in newer versions it doesn't have to poll the server. You can 
test to see if there are notifications ready to receive and process them 
on a timer loop. You're still polling, but only locally within the JVM; 
you're not creating any new network activity.

This does *NOT* work if you're using an SSL socket, though, so you have 
to be prepared to fall back to issuing "SELECT 1;" or the like for 
server-side polling if you can't use client-side-only polling.

--
Craig Ringer



view thread (8+ messages)

Message-ID: <4D1C2780.4030603@postnewspapers.com.au>
Permalink:  ../4D1C2780.4030603@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4D1C2780.4030603@postnewspapers.com.au

 · 

reply

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-jdbc@postgresql.org
  Cc: craig@postnewspapers.com.au, linuxhippy@gmail.com
  Subject: Re: Client-Side triggers possible?
  In-Reply-To: <4D1C2780.4030603@postnewspapers.com.au>
  References: <AANLkTinPZA4Ym66zgKppbAUiHu0o1GqbHtOoUB12huEZ@mail.gmail.com> <4D185A5A0200002500038BB1@gw.wicourts.gov> <AANLkTi=Sj8XyH8hqOy8dF64kUHcHh53x+w8UoY+x6aKd@mail.gmail.com> <4D1C2780.4030603@postnewspapers.com.au>

* 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