X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D91E752A74 for ; Fri, 19 Aug 2005 10:49:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03679-04 for ; Fri, 19 Aug 2005 13:49:20 +0000 (GMT) Received: from mailshell.com (web01.mailshell.com [209.157.66.231]) by svr1.postgresql.org (Postfix) with SMTP id 26F97529B5 for ; Fri, 19 Aug 2005 10:49:19 -0300 (ADT) Received: (qmail 17542 invoked by uid 99); 19 Aug 2005 13:49:58 -0000 Message-ID: <1124459398.4305e38681665@www.mailshell.com> Date: Fri, 19 Aug 2005 06:49:58 -0700 X-Priority: 3 (Normal) From: To: pgsql-jdbc@postgresql.org Subject: non-polling LISTEN MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit User-Agent: Mailshell.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.178 required=5 tests=[NO_REAL_NAME=0.178] X-Spam-Level: X-Archive-Number: 200508/136 X-Sequence-Number: 13705 I would like to be able to "watch" a table and be informed when a row is updated. I have seen the LISTEN/NOTIFY option, but it appears to be a polling arrangement. I will have 200 or so individual programs polling at 10 times a second, which seems like a lot of overhead. I would instead like to have each program perform something like a select(), and just block until the table updates. Is there are way to do this via the JDBC? (Our application is in Java) If this is only possible (if it is possible at all) via C or C++, I would be interested in knowing that as well. Thank you. Todd