Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id A25E0A01094 for ; Wed, 30 Nov 2011 09:58:24 -0400 (AST) Received: from 208-1-63-34.celito.net ([208.1.63.34] helo=smtpr.dunslane.net) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RVkg3-0007vI-AQ for pgsql-hackers@postgresql.org; Wed, 30 Nov 2011 13:58:23 +0000 Received: from [192.168.10.146] (cpe-098-027-054-176.nc.res.rr.com [98.27.54.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtpr.dunslane.net (Postfix) with ESMTP id 5953832B3C1; Wed, 30 Nov 2011 08:58:08 -0500 (EST) Message-ID: <4ED6366C.7000602@dunslane.net> Date: Wed, 30 Nov 2011 08:58:04 -0500 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= CC: Joel Jacobson , pgsql-hackers@postgresql.org Subject: Re: Java LISTEN/NOTIFY client library work-around References: <4ED62127.8050902@wulczer.org> In-Reply-To: <4ED62127.8050902@wulczer.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201111/1720 X-Sequence-Number: 199204 On 11/30/2011 07:27 AM, Jan Urba=C5=84ski wrote: > On 30/11/11 13:07, Joel Jacobson wrote: >> Hi, >> >> As you know, LISTEN/NOTIFY is broken in the Java client library. You=20 >> have >> to do a SELECT 1 in a while-loop to receive the notifications. >> >> http://jdbc.postgresql.org/documentation/head/listennotify.html >> >> Is there some other library with a proper implementation where you don= 't >> have to spam the database with queries to get the notifications? > > You mean a Java library? If Java is not a requirement, the psycopg2=20 > Python library supports notifies well. > > ... and probably most libraries that (unlike JDBC) are libpq-based, like=20 the perl DBD::Pg. cheers andrew