Subject: [postgresql-interfaces/psqlodbc] issue #132: Crash seen when attempting to use SetPos when looping through more than 20480 rows

From: "gabriellestein (@gabriellestein)" <[email-masked]>
Date: Mon, 14 Jul 2025 19:28:36 +0000

When looping through the rows in a table with more than 20480 rows using SetPos delete, the driver crashes with a segmentation fault (core dump). I have attached to this issue in a zip file:

- odbcquery_setpos_del_lax: ODBC app that can be used to recreate the issue
- odbcquery_setpos_del_lax.c: c file use to make the ODBC app.
- odbcquery_setpos_del.mak: Makefile to build ODBC app. Note that the directory paths to the install directory have been redacted.
- odbc.ini: ODBC ini file. Note the paths and sensitive information has been redacted.

If anything else is needed please let me know.

[odbcquery_setpos_del.zip](https://github.com/user-attachments/files/21221461/odbcquery_setpos_del.zip)

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Tue, 15 Jul 2025 20:06:01 +0000

May I ask what version of psqlodbc you are using ?

---

From: "gabriellestein (@gabriellestein)" <[email-masked]>
Date: Thu, 17 Jul 2025 13:26:36 +0000

This was tested against version 16. I will build the must up-to-date release in the repo (17.00.0006) and retest.
*Edit: I was just able to recreate against 17.00.0006.

---

From: "gabriellestein (@gabriellestein)" <[email-masked]>
Date: Wed, 27 Aug 2025 18:44:11 +0000

Hello, is there any update on this issue?

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Fri, 29 Aug 2025 21:07:35 +0000

Sorry, no, I'll try to have a look this week

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Tue, 16 Sep 2025 15:05:47 +0000

was unable to replicate this

```
Calling FetchScroll
End of result set. 20482 rows fetched.
```