pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: kristone@hotmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18606: syntax error at or near "ROWS"
Date: Mon, 09 Sep 2024 10:42:46 -0400
Message-ID: <3145581.1725892966@sss.pgh.pa.us> (raw)
In-Reply-To: <18606-7a775256cbcf4c1e@postgresql.org>
References: <18606-7a775256cbcf4c1e@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> 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```

Hmm, what that should look like when it gets to the server,
I imagine, is

  SELECT "Id","Begin","End","Logfile" FROM "ServerSession" ORDER BY "Begin"
  ASC OFFSET $1 ROWS FETCH FIRST $2 ROW ONLY;

which works just fine for me.  I'd suggest peeking into the postmaster
log to see what ODBC is actually sending in the problem cases.  I'm
guessing that pgsql_odbc is doing something bizarre, in which case
you'd be best advised to report this on the pgsql-odbc mailing list.

			regards, tom lane





view thread (2+ messages)

Message-ID: <3145581.1725892966@sss.pgh.pa.us>
Permalink:  ../3145581.1725892966@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3145581.1725892966@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kristone@hotmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18606: syntax error at or near "ROWS"
  In-Reply-To: <3145581.1725892966@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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