pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #2976: feat: fetch size for RefCursor
Date: Thu, 16 Nov 2023 08:50:47 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java:2263)

I am afraid this change does not fix the issue.

It uses `fetchRows` from the base `ResultSet` rather than `fetchRows` of the `ResultSet` that is associated with `refcursor` in question.

In other words:

Imagine we call `{? = call test_blob(?)}`.
`CallableStatement.execute` would gather call results, and it would execute `getObject` at https://github.com/pgjdbc/pgjdbc/blob/ca25d1053199da96a63838f7476a14137dc9d9be/pgjdbc/src/main/java/...

Then it would delegate to `PgResultSet.getObject -> internalGetObject -> getRefCursor`, and it would effectively use `fetchSize` from a temporary resultset associated with `{? = call test_blob(?)}`.

I believe we should add a test to ensure `fetch forward` is triggered at all.

view thread (17+ messages)  latest in thread

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: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #2976: feat: fetch size for RefCursor
  In-Reply-To: <<[email protected]>>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox