syntax error at or near "ROWS"

From: Kristian Ivarsson <sten(dot)kristian(dot)ivarsson(at)gmail(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: syntax error at or near "ROWS"
Date: 2024-09-10 08:18:25
Message-ID: DB9PR01MB951240CCA56FE855C86CB51EF19A2@DB9PR01MB9512.eurprd01.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

PostgreSQL version: 16.4
Operating system: Microsoft Windows 10 Enterprise Version 10.0.19044

SQLGetInfo with SQL_DBMS_NAME says version 16.0.4 though

Driver PSQLODBC35W.DLL version 13.02.0000

This error occurs only with some statements when using binding parameters
through ODBC

This statement is an example of when the error occurs

SELECT "Id","Begin","End","Logfile" FROM "ServerSession" ORDER BY "Begin" ASC OFFSET ? ROWS FETCH FIRST ? ROW ONLY

but some more complex SQL statements (with `... OFFSET ? ROWS FETCH FIRST ? ROW ONLY`) works just fine

Having fixed values (e.g. `...OFFSET 100 ROWS FETCH FIRST 10 ROW ONLY`) works for all statements

I still haven't figured out the pattern what the differences really are that make some statements to work and some not to work (I haven't dug into the open source code at all (yet))

/ Kristian

p.s.

I made a report to the "wrong" mail-list first where I was adviced to use this one

https://www.postgresql.org/message-id/3145581.1725892966%40sss.pgh.pa.us

d.s.

Browse pgsql-odbc by date

  From Date Subject
Next Message Michael Labon 2024-09-12 21:25:43 ODBC driver for mac
Previous Message Abhishek Kumar 2024-09-05 12:28:31 Latest version of psqlodbc in linux