Search Postgresql Archives

Re: 31.11. Notice Processing - associating notices with calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pawel Veselov <pawel.veselov@xxxxxxxxx> writes:
> What's the best way to "associate" an incoming notice with the statement
> that resulted in generating it?

Um ... the first issue with this problem statement is the assumption
that there *is* a statement that caused the notice.  The server is
capable of generating notices autonomously, for example during a forced
database shutdown.  But having said that, you could certainly keep track
of which command you last issued.

> Notice operate on PGResult objects, but
> these objects only become available after the statement call is made.

I think you are misunderstanding the notice receiver API.  The PGresult
that's passed to the receiver is just a transient one created to hold
the notice message's fields.  It has nothing to do with the PGresult
generated to hold the eventual result of the current query (if any).

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux