Skip to content

fix: Support SET without spaces around equals sign (#71)#72

Merged
erans merged 3 commits intomainfrom
fix/pgadmin4-set-compat-71
Mar 27, 2026
Merged

fix: Support SET without spaces around equals sign (#71)#72
erans merged 3 commits intomainfrom
fix/pgadmin4-set-compat-71

Conversation

@erans
Copy link
Copy Markdown
Owner

@erans erans commented Mar 27, 2026

Summary

  • Fix SET regex: Allow SET DateStyle=ISO (no spaces around =), in addition to the already-supported SET DateStyle = ISO and SET DateStyle TO ISO forms
  • Add pg_show_all_settings() support: Rewrite to pg_settings in query preprocessing, routing through existing PgSettingsHandler
  • Add set_config() support: Detect set_config(name, value, is_local) calls and return a synthetic wire response with the new value
  • Align server_version: Unify all 4 reporting locations (set_handler.rs, state.rs, system_functions.rs, pg_settings.rs) to 16.0

These changes allow pgAdmin4 to complete its initial connection handshake, which sends:

SET DateStyle=ISO; SET client_min_messages=notice; SELECT set_config('bytea_output','hex',false) FROM pg_show_all_settings() WHERE name = 'bytea_output'; SET client_encoding='utf-8';

Closes #71

Test plan

  • Unit tests for SET regex: no-spaces, with-spaces, TO keyword, capture verification
  • Unit tests for pg_show_all_settings() rewrite (case-insensitive, no-op when absent)
  • Unit tests for set_config() detection, captures, empty values, spaces
  • Integration test for the full pgAdmin4 query (rewrite + intercept combined flow)
  • Full test suite: 485 tests pass, 0 failures
  • Pre-commit checklist: cargo check, cargo clippy, cargo build, cargo test

🤖 Generated with Claude Code

erans and others added 3 commits March 27, 2026 15:20
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erans erans merged commit 244a8a3 into main Mar 27, 2026
1 check passed
@erans erans deleted the fix/pgadmin4-set-compat-71 branch March 27, 2026 23:14
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.

Support for SET without spaces around the equal sign

1 participant