31.11. Notice Processing - associating notices with calls - Mailing list pgsql-general

From Pawel Veselov
Subject 31.11. Notice Processing - associating notices with calls
Date
Msg-id CAMnJ+Bc7B+5XPWNzJPGWmt_T10L-anvmU6mFvRvm_W9=Fg2hGw@mail.gmail.com
Whole thread Raw
Responses Re: 31.11. Notice Processing - associating notices with calls
List pgsql-general
Hi.

What's the best way to "associate" an incoming notice with the statement that resulted in generating it? Notice operate on PGResult objects, but these objects only become available after the statement call is made. Should I have a global (or thread global, since my app is MT) "flag" that would tell the receiver what statement was executed last? I assume that the execution path is that notice call back is invoked while the statement function executes.

Thank you,
  Pawel.


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Error message "psql: could not connect to server: No such file or directory"
Next
From: "Anibal David Acosta"
Date:
Subject: Re: Help, server doesn't start