Skip to content

Commit f36bf0b

Browse files
authored
feat(frontend): support SET SESSION CHARACTERISTICS AS TRANSACTION (risingwavelabs#8497)
1 parent 79a3786 commit f36bf0b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/frontend/src/handler/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ use std::task::{Context, Poll};
1818

1919
use futures::stream::{self, BoxStream};
2020
use futures::{Stream, StreamExt};
21-
use pgwire::pg_response::StatementType::{ABORT, BEGIN, COMMIT, ROLLBACK, START_TRANSACTION};
21+
use pgwire::pg_response::StatementType::{
22+
ABORT, BEGIN, COMMIT, ROLLBACK, SET_TRANSACTION, START_TRANSACTION,
23+
};
2224
use pgwire::pg_response::{PgResponse, RowSetResult};
2325
use pgwire::pg_server::BoxedError;
2426
use pgwire::types::{Format, Row};
@@ -410,6 +412,10 @@ pub async fn handle(
410412
ROLLBACK,
411413
"Ignored temporarily. See detail in issue#2541".to_string(),
412414
)),
415+
Statement::SetTransaction { .. } => Ok(PgResponse::empty_result_with_notice(
416+
SET_TRANSACTION,
417+
"Ignored temporarily. See detail in issue#2541".to_string(),
418+
)),
413419
_ => Err(
414420
ErrorCode::NotImplemented(format!("Unhandled statement: {}", stmt), None.into()).into(),
415421
),

src/utils/pgwire/src/pg_response.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub enum StatementType {
8282
BEGIN,
8383
COMMIT,
8484
ROLLBACK,
85+
SET_TRANSACTION,
8586
}
8687

8788
impl std::fmt::Display for StatementType {

0 commit comments

Comments
 (0)