Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
От | Tom Lane |
---|---|
Тема | Re: NOTIFY in multi-statement PQexec() not sent outside of transaction |
Дата | |
Msg-id | 7726.1587413403@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: NOTIFY in multi-statement PQexec() not sent outside of transaction (John Muehlhausen <jgm@jgm.org>) |
Ответы |
Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
|
Список | pgsql-bugs |
John Muehlhausen <jgm@jgm.org> writes: > My perspective as a libpq user is that multi-statement PQexec() should have > the same effects as multiple PQexec() calls other than for the former > dropping the results of all but the most recent statement. Well, that's not even close to true, because of the rules about statements within a multi-statement string getting merged into single transactions. > As a practical matter, what I was trying to do is signal a test case that > Postgres is in the middle of processing a transaction string. I'm not really sure why you want to go about that in this particular way; under ordinary circumstances the client app wouldn't see the notify until after PQexec returned, anyway. (Yes, I realize that there are ways around that, but still, you can't really do anything with the connection until PQexec returns.) Perhaps you could achieve a similar effect using single-row mode, ie break the connection after collecting a few rows from a multi-row query? That's not PQexec at all of course, but if you use PQsendQuery then the server doesn't know the difference. regards, tom lane
В списке pgsql-bugs по дате отправления: