Skip to content

fix: skip multi-statement SET validation in session mode#1119

Open
DirtyRacer1337 wants to merge 1 commit into
pgdogdev:mainfrom
DirtyRacer1337:multi
Open

fix: skip multi-statement SET validation in session mode#1119
DirtyRacer1337 wants to merge 1 commit into
pgdogdev:mainfrom
DirtyRacer1337:multi

Conversation

@DirtyRacer1337

Copy link
Copy Markdown

just cherry pick from this 9235234

In session mode, PgDog should forward multi-statement queries to the server verbatim without validating whether they mix SET with other commands. The server owns the session and can handle these naturally.

Fixes a bug where queries like:
SET DateStyle='ISO'; show transaction_isolation

were rejected with 'multi-statement queries cannot mix SET with other commands' even when the pool was in session mode.

Closes #1087

In session mode, PgDog should forward multi-statement queries to the
server verbatim without validating whether they mix SET with other
commands. The server owns the session and can handle these naturally.

Fixes a bug where queries like:
  SET DateStyle='ISO'; show transaction_isolation

were rejected with 'multi-statement queries cannot mix SET with other
commands' even when the pool was in session mode.

Closes pgdogdev#1087
@CLAassistant

CLAassistant commented Jun 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/frontend/router/parser/query/set.rs 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@levkk

levkk commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Just a quick cargo fmt (and maybe a small test if you're feeling generous in parser/test/mod.rs).

@DirtyRacer1337

Copy link
Copy Markdown
Author

I'm not a rust dev, sorry

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session mode incorrectly rejects multi-statement queries mixing SET with other commands

3 participants