Re: [libpq] Async Queries and the Order of Execution

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Helmut Dittenwald <feldgrau77(at)gmail(dot)com>, pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: [libpq] Async Queries and the Order of Execution
Date: 2018-12-10 11:13:26
Message-ID: 526f75c9117662622c38c415b1e0a76d17bdfe93.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Rossi, Maria 2018-12-13 16:33:03 Postgres size greater than 1TB
Previous Message Helmut Dittenwald 2018-12-09 16:30:51 [libpq] Async Queries and the Order of Execution