Example of Asynchronous Query Processing in C?

From: Matthew Hagerty <matthew(at)venux(dot)net>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Example of Asynchronous Query Processing in C?
Date: 1999-02-12 03:56:03
Message-ID: 4.1.19990211224527.009502e0@mail.venux.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Meskes 1999-02-12 06:06:52 Re: [INTERFACES] facing problem with ecpg
Previous Message Stephen Turner 1999-02-11 23:04:00 Help with ODBC in VB6