Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVyqk-00AGb1-07 for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 21:14:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVyqi-00Gak9-2q for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 21:14:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVyqi-00Gak0-1k for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 21:14:21 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVyqh-001DOA-2o for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 21:14:20 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-657044fea68so559263eaf.0 for ; Wed, 17 Dec 2025 13:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766006059; x=1766610859; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dckcE3caeDx37589tiY07IVxBeNIk1YfVCEBtmipjtc=; b=ODqYmTLha4pnFT/lG8E6ZCFOQsHhyin9lUrN/12JxdjjKn1x/p0ZSP8Pirzgjc+dua k4HDdPseFSk8u1kwR9JTFxWynsCQGIOsIepl2TOLq0yTC2jmyo6OZ+RslKo7tHP6aWmF hxdl4xQmHj+ovQtqi/bTMlqdX7ipif8O2mGyUvigDHAxVuEjDs2wMtHuSc31jW+YdvmQ swMyBF+je9QtCLckIcATVLaHXPOKa+fQP/ms/WYzPZWFuWlo+122IhHjt8snZ27rxKV6 7rkJX5IpFeNSSUc1Ifiah1CSVLspDRrZqSmgA46i+DDh/RbuvLLMRfNC3i62N5jZhId8 oceg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766006059; x=1766610859; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dckcE3caeDx37589tiY07IVxBeNIk1YfVCEBtmipjtc=; b=TJaNkpvIKu7soS+2yZCCvOssvXR9rRdJaGWTI57Xumth8tFJwGcMAADnhqX8hH0FpZ 5npfpN8e/F8XLti/If4eaN2HC8xYBw4Z/2qav1ywqeWq2oTFm+ptiQxbwYcwLf8po4Wn 5DyXRx0flmB1oPoVAf2IeCtlBa7Ao1xeZ9Z+J5Xqs0rxzZcBkaXrC0zTHrE2MGYR/sxl xHPiw8qmxa6xxBGv3aAbXcGUvRgxKwSytmTh80meKO8+sin5FsCPtCcAlO73Nr49Q14K Gs9O6nArnlmFjhgm6TsjIGkzh4+tqz7oHvXUZ3D8CLS6PF+DiLIk9ZwjSZY/HvqshD13 /ALw== X-Forwarded-Encrypted: i=1; AJvYcCVHDvN2E3Fztifsbk0Mussgat5tmpLshSccnCzUJLR0YHK91EUJjUc1g7DTmpOcXBA0LeIhe6Fc6fL46/ZN@lists.postgresql.org X-Gm-Message-State: AOJu0YyHsiZMJXSf1WKse/D1ZKrHom49ckjgcvG7HbsVrquqJZ1tVSiC bEXb2zgnu7ZYI10vGAcwCzT4clIkH09P7MrPkD4h5oMJ9tL9qJz1Q8Jd8pg5JNAdjvWrb14kV5U xJHr4Dkzd7T9ICoM4Ft01RlcaFHFgEUTEXX2d X-Gm-Gg: AY/fxX6dvbuijNUs2Ss7v9MlgoeXsl0FQUgeJAU74r0X1/T2QCcs9TuIbgUnbWnPDsc SqxPTEZeDz2ntZLEMX5rYw/lbwYB4Xg6n6a7wxJRbFWkj7lpYSLEIvYKA0hXuLhzGv75XgxZv+P WoZ2iCgNTFG/ICXnzUzJebluYRLzdMAERqCR/yrQ4JF8t7Gelj/z5REb0CsDmxzK7LsjuZEXcYZ xvFScNzU65YgqS5n54wPb5t+i4shyeOWoAS+jEbAkEqBPDNXc7Unz6VrQiWvX4csqBc8OZN X-Google-Smtp-Source: AGHT+IHgTY4NCtK8V+WAubyLdorFnay9AyDj9tiBBzsHc+XCBybbtTOT/Cu/YndlbMz1cQbl4m6Ub1kBIweSJCK7PQo= X-Received: by 2002:a05:6820:f036:b0:659:9a49:8ee1 with SMTP id 006d021491bc7-65cfe70ca2bmr526328eaf.21.1766006058886; Wed, 17 Dec 2025 13:14:18 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6802:4843:20b0:605:7c4f:c829 with HTTP; Wed, 17 Dec 2025 13:14:18 -0800 (PST) In-Reply-To: References: <3fd9c2859c323d6f894ccf660764f24dc3423181.camel@cybertec.at> From: "David G. Johnston" Date: Wed, 17 Dec 2025 14:14:18 -0700 X-Gm-Features: AQt7F2pg54bLjcpM-Sj6UW2KhMdCZR5T4k-TZE6FBt5L9qVpGX3pa_mDacL30Lo Message-ID: Subject: Re: libpq simple SELECT To: Igor Korot Cc: Laurenz Albe , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000cfa8ad06462c5334" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000cfa8ad06462c5334 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, December 17, 2025, Igor Korot 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=E2=80=99t an example of doing so without a cur= sor 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 =E2=80=9Cfet= ch=E2=80=9D 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= . David J. --000000000000cfa8ad06462c5334 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, December 17, 2025, Igor Korot <ikorot01@gmail.com> wrote:

I hope now my question is clear. I want to know if using CURSR
is a must.

No it is not.=C2=A0 But there isn=E2=80=99= t an example of doing so without a cursor because it is deemed trivial enou= gh that a competent C writer can figure it out.=C2=A0 In particular, it bas= ically is just the same code as the =E2=80=9Cfetch=E2=80=9D portion of the = example, but the select command is supplied instead of a fetch command.=C2= =A0 Both of those SQL commands result is tuples being generated.
=
David J.

--000000000000cfa8ad06462c5334--