Skip to content

Conversation

@sunng87
Copy link
Member

@sunng87 sunng87 commented Nov 21, 2025

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

Fixes #7253
Fixes #7254

What's changed and what's your intention?

This patch, together with upstream pgwire fixes sunng87/pgwire#350 and sunng87/pgwire#351 resolves two issues with extended queries:

  1. Always use client provided types in DESCRIBE statement call, we will only use server inferred types when types are absent in PARSE. (Fixes Failed to insert jdbc Timestamp using postgres jdbc java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp, java.util.Calendar) method #7253 when using int8 for timestamp, the server inferred type is TIMESTAMP but client refused to use it)
  2. Added support for use text encoding of extended query parameters. This resolves Failed to insert jdbc Boolean using postgres jdbc java.sql.PreparedStatement#setBoolean method #7254 when JDBC driver sends TRUE as text encoded boolean value but we were trying to decode it as binary. causing invalid buffer size error.

This patch also contains some API adoption to update pgwire to latest version.

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

@sunng87 sunng87 marked this pull request as ready for review November 22, 2025 01:46
@sunng87 sunng87 requested a review from a team as a code owner November 22, 2025 01:46
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! LGTM

Once this PR is merged, I'll add basic CI tests for JDBC with MySQL and PG drivers to prevent future regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs. size/S

Projects

None yet

2 participants