-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling autoCommit breaks the driver #3
Comments
Possibly throw error |
This might be ok, I have not encountered a framework that would set
autocommit on its own.
On the other hand, if the driver is read only all the time, no matter what
- ignoring all the requests related to data modifications should be not
harmful and a bit simpler. But you decide on the approach.
…On Tue, 5 Feb 2019 at 17:06, bobstarbird ***@***.***> wrote:
Possibly throw error
throw new PSQLException(GT.tr("AutoCommit false is not supported."),
PSQLState.NOT_IMPLEMENTED);
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGQQxIJ_sAvTS52-tpmHelDPZZbIupuqks5vKavvgaJpZM4Z7tgb>
.
|
Proposed implementation:
} |
QUERY_SUPPRESS_BEGIN controls emision of "BEGIN" |
is this issue resolved? what's the solution |
Initially BEGIN was suppressed in the driver with code modifications. |
@bobstarbird Thanks for your inputs. using mljdbc-42.1.4.jar (without suppress BEGIN - since the one uploaded in github is corrupted) we are using 10.0-4.3. but still unable to run queries via JDBC/ODBC driver. We can establish the connectivity and see tables but getting the below error for some reason when we run a specific query to extract the data from ML : TRACE LOGGINGSep 10, 2020 10:35:41 AM org.postgresql.jdbc.PgConnection setAutoCommit ERRORError: java.lang.RuntimeException: java.lang.RuntimeException: org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend. |
I am trying to use the driver together with PrestoDB. I encountered few issues, this is the last of them, with changes needed for it - the driver works!
The description of Transactions in Readme.md is misleading, it is actually the opposite, if you set conn.autoCommit(false) the queries will start failing - see details below.
If you use the driver as a part of bigger framework you might not be able to prevent the framework from switching the autoCommit to false.
Given that the whole driver is Read Only - the simplest option is to remove the ability to switch it in PgConnection. Then the the whole paragraph in Readme.md could be removed, will not make any sense.
Details
wich is difficult to trace as the message from ML is not very helpful
Without conn.setAutoCommit(false) it all works perfectly.
Let me know if I should create pull request that will remove the functionality to switch PgConnection.setAutoCommit()
The text was updated successfully, but these errors were encountered: