PQsendQuery
От | Michael Simms |
---|---|
Тема | PQsendQuery |
Дата | |
Msg-id | 199908050302.EAA18663@argh.demon.co.uk обсуждение исходный текст |
Ответ на | ElephantWear Now Available... (The Hermit Hacker <scrappy@hub.org>) |
Список | pgsql-general |
Hi I have a query regarding PQsendQuery that doesnt seem to be well explained in the docs. My basic situation is that I want to run a series of queries quickly, and I dont care what the result of them is (it is an insert). 1 ) When I run PQsendQuery(), can I then immediately run PQexec() or do I have to wait till the PQsendQuery has returned. 2 ) If I use PQconsumeInput(), does this tell the backend to not send the results of any queries pending? Or do I still get new ones coming back at me? 3 ) Finally, what happens if I close the database connection when I still have a queue of queries sitting in the PQsendQuery queue? From what I have observed, I would guess: 1 ) PQexec is safe and jumps to the front of the queue 2 ) All future queries are still piped through 3 ) The unhandled queries are trashed. Thanks M Simms
В списке pgsql-general по дате отправления: