From: | Hédi HACHENI <hacheni(at)kopileft(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | JDBC and positioned updates |
Date: | 2015-12-25 15:10:51 |
Message-ID: | 567D5C7B.3060402@kopileft.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Dear,
We are using PostgreSQL (server version 9.4.5) with a JDBC connection
(version 9.1.x).
It seems that JDBC implementation does not support the setting of a
cursor name for an SQL statement. The following example will be used to
illustrate the problem.
Consider that we have the SELECT statement below :
SELECT Column1,
Column2
Column3,
Column4
FROM MyTable
*FOR UPDATE*
Then, we want to perform a positioned update based on the SELECT above :
UPDATE MyTable
SET Column1 = new_value,
Column3 = new_value
*WHERE CURRENT OF* cursor_name
To achieve our goal, we would use the
java.sql.Statement#*setCursorName*(String) to reference the SELECT
statement. Then, using the java.sql.ResultSet#*getCursorName*() to get
the used cursor name for the statement. Nevertheless, the
java.sql.ResultSet#getCursorName() returns *null* as value and even the
java.sql.Statement#setCursorName(String) method seems to be not implemented.
Based on what explained above, we would like to ask four major questions :
* Is there any plan for the implementation of the mentioned feature in
further JDBC versions ?
* Is there any alternative solution that aid us to perform a
positioned update using JDBC ?
* If the JDBC implementation should be modified, can you guide us or
give us ideas to get started ?
* If we are obliged to implement the feature by modifying the JDBC
implementation, is there any interest in this modified JDBC ?
Thanks for your feedback.
Best regards,
Hédi HACHENI
kopiLeft Services
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Sitnikov | 2015-12-25 15:38:49 | Re: JDBC and positioned updates |
Previous Message | Glenn Holmer | 2015-12-24 14:36:47 | Re: PgJDBC - mvn release |