Re: [libpq] Async Queries and the Order of Execution - Mailing list pgsql-novice

From Laurenz Albe
Subject Re: [libpq] Async Queries and the Order of Execution
Date
Msg-id 526f75c9117662622c38c415b1e0a76d17bdfe93.camel@cybertec.at
Whole thread Raw
In response to [libpq] Async Queries and the Order of Execution  (Helmut Dittenwald <feldgrau77@gmail.com>)
List pgsql-novice
Helmut Dittenwald wrote:
> I have some very simple, single-threaded, client-side C code:
> 
> ...
> PQsendPrepare(...);
> PQsetnonblocking(...);
> while(1) {
>   PQsendQueryPrepared(...); // [1]
>   // Here I PQgetResult and PQclear it when done. Not shown to keep brevity.
> }
> 
> Now I'm curious whether the queries [1] are executed in the same order as they are being sent..?
> My experiments indicate that this is the case, but is it guaranteed?

Yes, they will be sent in the order you indicate, and they will be executed
in the order in which they were sent.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



pgsql-novice by date:

Previous
From: Helmut Dittenwald
Date:
Subject: [libpq] Async Queries and the Order of Execution
Next
From: Colin Brisson
Date:
Subject: Changing Pl/Python default interpreter