-
Notifications
You must be signed in to change notification settings - Fork 1
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
DBeaver: NumberFormatException
when importing data into table with boolean column
#112
Comments
NumberFormatException
when importing data into table with boolean column
Hi @hlcianfagna. Thanks for your report. Can I humbly ask you to evaluate the problem closer, maybe together with @surister, @seut, or @proddata, and maybe derive or transfer this issue into crate/crate, also tagging it with tool: DBeaver, when applicable? |
I did a quick test, this still occurs with the latest version of DBeaver and the latest nightly of CrateDB. |
Hi @hlcianfagna. I guess you have been using the PostgreSQL JDBC Driver in your experiments? Does the problem also happen when using the CrateDB JDBC Driver? Because PostgreSQL compatibility on so many details is currently out of reach, we have been refurbishing the messaging about the CrateDB JDBC Driver, planning to focus the DBeaver integration on that one, what Blog: Use CrateDB With DBeaver is also doing, and what we also have been doing on the documentation for DataGrip. |
In the spirit of the above proposal, to focus on the CrateDB JDBC Driver again, which hopefully works in more occasions than the one for PostgreSQL, let me reference DBeaver plugin descriptions of CrateDB (Legacy) vs. CrateDB. Because being thoroughly compatible with vanilla PostgreSQL is difficult and will always be a moving target for CrateDB, maybe we should remove the PostgreSQL-based item again, and also promote "CrateDB (Legacy)" to canonical "CrateDB" here, to reduce confusion and friction for all users of DBeaver and CrateDB. This might partly revert the updates submitted by @proddata the other day,
so I'd also like to involve him into this discussion, in order to possibly collectively agree to the conclusion that the CrateDB JDBC Driver should NOT be declared legacy, but should be promoted and avertised to be the primary JDBC connector library to use with CrateDB instead. |
Caution The CrateDB JDBC driver is outdated and shall only be used with caution. Until there is a decision to bring this back to full maintenance, no tool or integration shall use this at all. If there is something not working in DBeaver, this shall be fixed by customizing the CrateDB connection there (which is possible) or adding functionality to CrateDB. |
This issue has been fixed with CrateDB 5.9.1 and later versions related issue: crate/crate#16797
cr> create table repro (flag BOOLEAN);
CREATE OK, 1 row affected (0.164 sec)
cr> SELECT * FROM repro;
+------+
| flag |
+------+
+------+
SELECT 0 rows in set (0.064 sec)
cr> SELECT * FROM repro;
+-------+
| flag |
+-------+
| FALSE |
+-------+
SELECT 1 row in set (0.013 sec) |
Then create a
.csv
file and try to import it from DBeaver with the default "Data load settings" with "Skip bind values during insert" not selectedIn CrateDB this will fail with
in PostgreSQL it works
(DBeaver also succeeds if the column is
INT
instead ofBOOLEAN
or if we select the option to skip binding)I can get the same stack trace in Java if I use a
setBigDecimal
against aPreparedStatement
instead of asetBoolean
, however this fails also against pgqsl while DBeaver works against pgsql.So perhaps this something about
pg_type
not having composite type entries for the tables or aboutpg_description
not having an entry for theboolean
data type?The text was updated successfully, but these errors were encountered: