pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
ecpg Fetch issue 2+ messages / 2 participants [nested] [flat]
* ecpg Fetch issue @ 2025-11-09 13:26 Tzuriel Kahlon <tzuriel.kahlon@surecomp.com> 0 siblings, 1 reply; 2+ messages in thread From: Tzuriel Kahlon @ 2025-11-09 13:26 UTC (permalink / raw) To: pgsql-bugs Hey , my progra running from Cobol and im using ECPG for that the issue is when i use FETCH command the fetch going one by one and not take all the rows in batch , there is any solution for that regard to change the code itself ? Regards, -- Tzuriel Kahlon DBA [cid:8ae894a1-7844-4af3-a977-fb19f725f472]<http://www.surecomp.com/rivo-trade; Attachments: [image/png] Outlook-l3yi3zgx.png (45.4K, ../../AM9PR06MB8017AE706EA6FEC256523716FDC1A@AM9PR06MB8017.eurprd06.prod.outlook.com/3-Outlook-l3yi3zgx.png) download | view image ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ecpg Fetch issue @ 2025-11-10 11:43 Heikki Linnakangas <hlinnaka@iki.fi> parent: Tzuriel Kahlon <tzuriel.kahlon@surecomp.com> 0 siblings, 0 replies; 2+ messages in thread From: Heikki Linnakangas @ 2025-11-10 11:43 UTC (permalink / raw) To: Tzuriel Kahlon <tzuriel.kahlon@surecomp.com>; pgsql-bugs On 09/11/2025 15:26, Tzuriel Kahlon wrote: > Hey , > my progra running from Cobol and im using ECPG for that the issue is > when i use FETCH command the fetch going one by one > and not take all the rows in batch , there is any solution for that > regard to change the code itself ? There's an example in the docs that fetches multiple rows into an array. See https://www.postgresql.org/docs/18/ecpg-descriptors.html: > PostgreSQL supports retrieving more that one record in one FETCH statement and storing the data in host variables in this case assumes that the variable is an array. E.g.: > > EXEC SQL BEGIN DECLARE SECTION; > int id[5]; > EXEC SQL END DECLARE SECTION; > > EXEC SQL FETCH 5 FROM mycursor INTO SQL DESCRIPTOR mydesc; > > EXEC SQL GET DESCRIPTOR mydesc VALUE 1 :id = DATA; P.S. Please post usage questions like this to pgsql-general in the future, the pgsql-bugs list is for reporting bugs. - Heikki ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-11-10 11:43 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-11-09 13:26 ecpg Fetch issue Tzuriel Kahlon <tzuriel.kahlon@surecomp.com> 2025-11-10 11:43 ` Heikki Linnakangas <hlinnaka@iki.fi>
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