Re: libpq simple SELECT

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: libpq simple SELECT
Date: 2025-12-17 21:22:57
Message-ID: CA+FnnTx42yOoax2VkXbEs1s=JnDORi72CAiT+BvW-jF7aiNV1A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

David,,

On Wed, Dec 17, 2025 at 1:14 PM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Wednesday, December 17, 2025, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>>
>>
>> I hope now my question is clear. I want to know if using CURSR
>> is a must.
>
>
> No it is not. But there isn’t an example of doing so without a cursor because it is deemed trivial enough that a competent C writer can figure it out. In particular, it basically is just the same code as the “fetch” portion of the example, but the select command is supplied instead of a fetch command. Both of those SQL commands result is tuples being generated.

So what do I do after calling PQexec()? And why is my code running only once?

Thank you.

>
> David J.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-12-17 21:30:29 Re: libpq simple SELECT
Previous Message David G. Johnston 2025-12-17 21:14:18 Re: libpq simple SELECT