Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 315B99F95E3 for ; Wed, 3 Jan 2007 10:09:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 24032-03 for ; Wed, 3 Jan 2007 10:09:06 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 7BF489FA0CC for ; Wed, 3 Jan 2007 10:09:12 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id CC29F74814; Wed, 3 Jan 2007 14:09:02 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 6B97EFF05; Wed, 3 Jan 2007 14:09:02 +0000 (GMT) Message-ID: <459BB8FD.8030207@archonet.com> Date: Wed, 03 Jan 2007 14:09:01 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5.0.8 (X11/20061115) MIME-Version: 1.0 To: ramachandra.bhaskaram@wipro.com Cc: pgsql-sql@postgresql.org Subject: Re: [SQL NOTIFY Help] sending NOTIFY to the external program References: <47230CE166B64744B0120173E4C2161E0103E69F@BLR-EC-MBX01.wipro.com> In-Reply-To: <47230CE166B64744B0120173E4C2161E0103E69F@BLR-EC-MBX01.wipro.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/4 X-Sequence-Number: 27156 ramachandra.bhaskaram@wipro.com wrote: > Hi Richard Huxton, > > Thank you for your kind response. > > Is there not any other way other than record the pkey in a > "process_these" table and have the application check there. We want > to minimise the database transactions to improve the DB performance. > > Can we send the exact data which has been changed using > db-notify to the application? So that, the application can continue > processing the data using the Notify message from the DB. Not via your database connection. With one of the untrusted languages (C, pl/perlu pl/pythonu etc) you could do anything you could make a separate connection / write to a file etc. Does your application need to know *immediately* that a change in the database has occurred? -- Richard Huxton Archonet Ltd