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

Re: Client-Side triggers possible?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Clemens Eisserer <linuxhippy(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Client-Side triggers possible?
Date: 2010-12-30 06:32:32
Message-ID: 4D1C2780.4030603@postnewspapers.com.au (view raw or flat)
Thread:
Lists: pgsql-jdbc
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

In response to

pgsql-jdbc by date

Next:From: Thor Michael StøreDate: 2010-12-30 19:47:14
Subject: java.sql.DatabaseMetaData.getProcedures and overloaded functions
Previous:From: Samuel GendlerDate: 2010-12-29 13:15:59
Subject: Re: PostgreSQL Authentication and Pooling in JBoss : static 'postgres' user VS dynamic jboss user

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