Re: 31.11. Notice Processing - associating notices with calls
От | Tom Lane |
---|---|
Тема | Re: 31.11. Notice Processing - associating notices with calls |
Дата | |
Msg-id | 22094.1340636823@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | 31.11. Notice Processing - associating notices with calls (Pawel Veselov <pawel.veselov@gmail.com>) |
Ответы |
Re: 31.11. Notice Processing - associating notices with calls
|
Список | pgsql-general |
Pawel Veselov <pawel.veselov@gmail.com> 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
В списке pgsql-general по дате отправления: