-
Notifications
You must be signed in to change notification settings - Fork 246
[Ideas] Official JDBC/ODBC driver required #1705
Description
I'm using the PostgreSQL JDBC Driver (ver. 42.7.3, JDBC4.2) in my IDE to connect to a Cloudberry Database. However, it often fails to recognize Cloudberry-specific features such as DISTRIBUTED BY, ORIENTATION, and others. When reverse-engineering DDL from metadata, these critical details are missing. This information is sometimes very useful—for example, when optimizing SQL queries.
Is there any plan to provide an official Cloudberry JDBC driver that properly supports these extensions?
Use case/motivation
No response
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
All reactions
Replies: 1 comment 1 reply
Hi @cleverxiao001,
Thanks for raising this — recognizing Cloudberry-specific syntax like DISTRIBUTED BY and ORIENTATION in metadata is genuinely useful for tooling and query optimization, so this is a fair ask.
Just to share what I found while looking into it: there is an existing repo at cloudberry-contrib/jdbc that seems intended as a home for a Cloudberry JDBC driver. However, in its current state it appears to be a straight mirror of upstream pgjdbc — the README is unchanged from PgJDBC, a code search for cloudberry or DISTRIBUTED returns no hits, and the most recent commits (latest dated 2024年12月12日) all look like upstream syncs. So as it stands today, it would not behave any differently from the stock PostgreSQL driver for the cases you described.
That said, the repo could be a great starting point if the community wants to build a proper Cloudberry-aware driver on top of it (extended DatabaseMetaData, DDL reverse-engineering that preserves distribution/storage clauses, etc.). Since you mentioned you would be willing to submit a PR, it might be worth checking with the maintainers whether cloudberry-contrib/jdbc is the intended landing spot for that work, or whether a new official driver effort should be kicked off here.
Happy to help think through what the metadata extensions might look like if it is useful.
All reactions
I have analyzed a Greenplum JDBC driver. This driver dates back to the Pivotal era of Greenplum and has been obfuscated. Its directory structure is quite different from that of standard pgJDBC. Its most valuable feature appears to be high-performance parallel bulk data loading. I have also located part of the code responsible for retrieving proprietary metadata. I am still continuing my analysis to figure out how to implement my business requirements.
All reactions
-
👍 2