PQsendQuery

From: Michael Simms <grim(at)argh(dot)demon(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: PQsendQuery
Date: 1999-08-05 03:02:45
Message-ID: 199908050302.EAA18663@argh.demon.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce 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

In response to

Browse pgsql-announce by date

  From Date Subject
Next Message Kaare Rasmussen 1999-08-07 09:57:29 Re: [GENERAL] ElephantWear Now Available...
Previous Message The Hermit Hacker 1999-08-04 22:14:41 Re: [GENERAL] ElephantWear Now Available...

Browse pgsql-general by date

  From Date Subject
Next Message DE VOLDER Fabrice 1999-08-05 06:25:29 unsuscribe
Previous Message Héctor Morales 1999-08-05 00:30:23 Problem with pgaccess