31.11. Notice Processing - associating notices with calls

From: Pawel Veselov <pawel(dot)veselov(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: 31.11. Notice Processing - associating notices with calls
Date: 2012-06-25 09:10:33
Message-ID: CAMnJ+Bc7B+5XPWNzJPGWmt_T10L-anvmU6mFvRvm_W9=Fg2hGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anibal David Acosta 2012-06-25 11:47:30 Re: Help, server doesn't start
Previous Message Craig Ringer 2012-06-25 08:36:03 Re: Error message "psql: could not connect to server: No such file or directory"