From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Om Prakash Jaiswal <op12om@yahoo.co.in>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Request for example using pqconnectstart,pqconnectpoll part.
Date: Thu, 04 Feb 2021 17:16:49 +0100
Message-ID: <fb71b7a9c9b6e8aecc8b52e4f3d1c3f1d7f59a8a.camel@cybertec.at> (raw)
In-Reply-To: <1275164188.2095748.1612452437482@mail.yahoo.com>
References: <1275164188.2095748.1612452437482.ref@mail.yahoo.com>
<1275164188.2095748.1612452437482@mail.yahoo.com>
On Thu, 2021-02-04 at 15:27 +0000, Om Prakash Jaiswal wrote:
> Please provide a sample example using pqconnectstart , pqconnectpoll to make
> a asynchronous connection and executing a query for client application in C.
> It is part of libpq - C Library.
> I am able to do query using PQconnectdb and PQexec.
> I have also used PQconnectdb and PQsendQuery. PQconnectdb is blocking call,
> now I want to replace PQconnectdb with non blocking connection pqconnectstart and pqconnectpoll.
>
> Please provide an example.
I used it in
https://github.com/laurenz/pgreplay/blob/master/database.c#L404
but it certainly is not the most concise example.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, op12om@yahoo.co.in
Subject: Re: Request for example using pqconnectstart,pqconnectpoll part.
In-Reply-To: <fb71b7a9c9b6e8aecc8b52e4f3d1c3f1d7f59a8a.camel@cybertec.at>
References: <1275164188.2095748.1612452437482.ref@mail.yahoo.com> <1275164188.2095748.1612452437482@mail.yahoo.com> <fb71b7a9c9b6e8aecc8b52e4f3d1c3f1d7f59a8a.camel@cybertec.at>
* 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