From: Matthew Hagerty <matthew@venux.net>
To: pgsql-interfaces@postgreSQL.org
Subject: Example of Asynchronous Query Processing in C?
Date: Thu, 11 Feb 1999 22:56:03 -0500
Message-ID: <4.1.19990211224527.009502e0@mail.venux.net> (raw)
Greetings,
I was reading through the docs for libpq and in the Asynchronous Query
Processing section there is mention of an example program that demonstrates
the use of select(2) to wait for the backend. I could not find the
example, does anyone have one? I understand what needs to be done, however
it is always nice to have some sort of reference program to follow.
What I am hoping to accomplish is to have my frontend accept a query, pass
it to the backend, and build the output based on the query. I would also
like the user to be able to limit the number of records (tuples) returned
and cancel the query if necessary; hence the use of the async functions and
select(2).
I know psql does this and I'm about to go poking around in its source, but
the Asynchronous Query Processing doc mentions the psql uses the PQexec
function in conjunction with PQrequestCancel, so I'm not sure if it will
give me the example I'm looking for.
If someone has a function that does what I'm looking for, hey that would be
swell ;), or just a simple example of async processing would be nice too.
Thanks,
Matthew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: matthew@venux.net
Subject: Re: Example of Asynchronous Query Processing in C?
In-Reply-To: <4.1.19990211224527.009502e0@mail.venux.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox