-
-
Notifications
You must be signed in to change notification settings - Fork 87
Description
ArcadeDB Version: v21.10.2-SNAPSHOT (main a7e3074)
JDK Version: azul-11
OS: MacOS Big Sur
(Reproed on docker 21.10.2-SNAPSHOT (build 8c0fb3d99b4153a1de33fa0b455a3d1cbf7efbfc/1634191813975/main) as well)
I just wanted to add some notes regarding my investigation around getting JetBrains' IDE tool's database support connecting properly.
By default, it will authenticate and correctly select the database. Any attempts to query result in ArcadeDB closing the connection immediately. Log output with debug = true in PostgresNetworkExecutor looks like this:
2021-10-14 13:18:15.534 SEVER [PostgresNetworkExecutor] <ArcadeDB_0> Postgres wrapper: Error on reading request: com.arcadedb.exception.CommandExecutionException: Unknown function name :version
2021-10-14 13:18:15.534 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL: execute (portal=) (limit=0)-> select version() (thread=31)
2021-10-14 13:18:15.534 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL:-> ready for query (Z - 5b) (thread=31)
2021-10-14 13:18:15.547 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL: parse (portal=) -> SET application_name = 'IntelliJ IDEA 2021.2.2' (params=0) (thread=31)
2021-10-14 13:18:15.547 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL:-> parse complete (1 - 4b) (thread=31)
2021-10-14 13:18:15.548 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL: bind (portal=) -> (thread=31)
2021-10-14 13:18:15.548 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL:-> bind complete (2 - 4b) (thread=31)
2021-10-14 13:18:15.548 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL: execute (portal=) (limit=1)-> SET application_name = 'IntelliJ IDEA 2021.2.2' (thread=31)
2021-10-14 13:18:15.548 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL:-> empty query response (I - 4b) (thread=31)
2021-10-14 13:18:15.548 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL:-> ready for query (Z - 5b) (thread=31)
2021-10-14 13:18:15.573 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL: parse (portal=) -> (params=0) (thread=31)
2021-10-14 13:18:15.574 INFO [PostgresNetworkExecutor] <ArcadeDB_0> PSQL:-> bind complete (2 - 4b) (thread=31)
2021-10-14 13:18:15.578 SEVER [PostgresNetworkExecutor] <ArcadeDB_0> Unexpected message type '�' for message any
After poking around for a while, I found a setting buried in the connection properties advanced tab "perferQueryMode":
By default, this is set to extended. If you change it to simple, we get a bit further:
Now any queries will fail with the following error: ERROR: Syntax error on executing query: Encountered " <SET> "SET "" at line 1, column 1. because the driver JetBrains uses by default prepends queries with the following:
SET extra_float_digits = 3
ArcadeDb doesn't support this, and it is meaningless and might be due to the driver having trouble figuring out the pgsql version or something. Anyway, a Google led me to the next setting to tweak:
You must set assumeMinServerVersion exactly as shown: 9.0, and this will prevent the driver sending this extra SET command.
This did it, and I could run queries!
The introspection features fail, but harmlessly.
Anyway, not sure what actions there are to be taken. There might be a way for ArcadeDb to ask for "simple" queries and it could just ignore the extra_float_digits set, I guess? Maybe this should end up summarized in the documentation?
Hope this helps someone. :)


