feat: update pgwire to 0.30 (#6209)

This commit is contained in:
Ning Sun
2025-05-29 19:47:00 +08:00
committed by GitHub
parent 183e1dc031
commit 4ae6df607b
3 changed files with 11 additions and 10 deletions

4
Cargo.lock generated
View File

@@ -8428,9 +8428,9 @@ dependencies = [
[[package]]
name = "pgwire"
version = "0.29.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4e6fcdc2ae2173ef8ee1005b6e46453d45195ac3d97caac0db7ecf64ab4aa85"
checksum = "ec79ee18e6cafde8698885646780b967ecc905120798b8359dd0da64f9688e89"
dependencies = [
"async-trait",
"bytes",

View File

@@ -87,7 +87,7 @@ opensrv-mysql = { git = "https://github.com/datafuselabs/opensrv", rev = "a1fb4d
opentelemetry-proto.workspace = true
otel-arrow-rust.workspace = true
parking_lot.workspace = true
pgwire = { version = "0.29", default-features = false, features = ["server-api-ring"] }
pgwire = { version = "0.30", default-features = false, features = ["server-api-ring"] }
pin-project = "1.0"
pipeline.workspace = true
postgres-types = { version = "0.2", features = ["with-chrono-0_4", "with-serde_json-1"] }

View File

@@ -49,11 +49,7 @@ use crate::SqlPlan;
#[async_trait]
impl SimpleQueryHandler for PostgresServerHandlerInner {
#[tracing::instrument(skip_all, fields(protocol = "postgres"))]
async fn do_query<'a, C>(
&self,
client: &mut C,
query: &'a str,
) -> PgWireResult<Vec<Response<'a>>>
async fn do_query<'a, C>(&self, client: &mut C, query: &str) -> PgWireResult<Vec<Response<'a>>>
where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync,
C::Error: Debug,
@@ -219,7 +215,12 @@ impl DefaultQueryParser {
impl QueryParser for DefaultQueryParser {
type Statement = SqlPlan;
async fn parse_sql(&self, sql: &str, _types: &[Type]) -> PgWireResult<Self::Statement> {
async fn parse_sql<C>(
&self,
_client: &C,
sql: &str,
_types: &[Type],
) -> PgWireResult<Self::Statement> {
crate::metrics::METRIC_POSTGRES_PREPARED_COUNT.inc();
let query_ctx = self.session.new_query_context();
@@ -282,7 +283,7 @@ impl ExtendedQueryHandler for PostgresServerHandlerInner {
async fn do_query<'a, C>(
&self,
client: &mut C,
portal: &'a Portal<Self::Statement>,
portal: &Portal<Self::Statement>,
_max_rows: usize,
) -> PgWireResult<Response<'a>>
where