Re: Retrieve the record ID - Mailing list pgsql-general

From Luca Ciciriello
Subject Re: Retrieve the record ID
Date
Msg-id BAY114-F2347C1BD7C960CF6E452C89AF70@phx.gbl
Whole thread Raw
In response to Re: Retrieve the record ID  (Kenneth Downs <ken@secdat.com>)
List pgsql-general
Yes, I've used RAISE NOTICE, but I'm unable to catch it in my code. I've
used PQsetNoticeProcessor to set my callback function but doesn't seem to
work. In My application I'm unable to catch the notice launched by the
trigger. Wich function I have to use in my application in order to catch the
notice event?

Luca.


>From: Kenneth Downs <ken@secdat.com>
>To: Luca Ciciriello <luca_ciciriello@hotmail.com>
>CC: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] Retrieve the record ID
>Date: Fri, 20 Jul 2007 08:49:33 -0400
>
>We have a system that sends back information by using the RAISE NOTICE.
>I've taken two lines out of it and put them here to illustrate the idea.
>You may have to play with it to get it right:
>
>NotifyList = 'The OID is:  ' || CAST(new.oid as varchar(10)) || ';';
>RAISE NOTICE '%',NotifyList;
>
>Luca Ciciriello wrote:
>>Hi all.
>>I'm new to this list and, first of all, I'm a new user of PostgreSQL.
>>The version I'm using is 8.2.3 and I've the necessity to retrieve, using
>>an
>>application, the ID of a modified (INSERT, UPDATE, DELETE) record of a
>>triggered table. I wasn't able to find out a way to obtain the required
>>ID.
>>The only information available outside of the DBMS and usable by my app
>>(subscribed for a significant event) are the table name and the server
>>process id.
>>The application is running on Windows XP and the server is installed on
>>Windows Server 2003.
>>Any one knows a way to notify my app with the ID of the modified record?
>>Any idea is appreciated.
>>
>>Thanks in advance.
>>
>>Luca
>>
>>_________________________________________________________________
>>Watch all 9 Live Earth concerts live on MSN.  http://liveearth.uk.msn.com
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 3: Have you checked our extensive FAQ?
>>
>>               http://www.postgresql.org/docs/faq
>
>
>--
>Kenneth Downs
>Secure Data Software, Inc.
>www.secdat.com    www.andromeda-project.org
>631-689-7200   Fax: 631-689-0527
>cell: 631-379-0010
>

_________________________________________________________________
The next generation of Hotmail is here! http://www.newhotmail.co.uk/


pgsql-general by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: {Spam} Need help with bash script and postgresql
Next
From: Perry Smith
Date:
Subject: Re: Need help with bash script and postgresql