Skip to content

Conversation

@ndenev
Copy link
Owner

@ndenev ndenev commented Jan 17, 2026

Summary

  • Switch from GenericDialect to PostgreSqlDialect in all sqlparser usages
  • Ensures consistency with PRQL's PostgreSQL target dialect
  • Aligns with k8sql's PostgreSQL wire protocol in daemon mode

Why

k8sql presents as a PostgreSQL-compatible database:

  • Daemon mode speaks PostgreSQL wire protocol (pgwire)
  • PRQL compiles to PostgreSQL dialect SQL
  • JSON operators use PostgreSQL's -> and ->>
  • Regex uses PostgreSQL's ~ operator

Using PostgreSqlDialect throughout eliminates potential edge cases where PostgreSQL-specific SQL syntax might not parse correctly with GenericDialect.

Changes

File Change
json_path.rs Tokenizer dialect
preprocess.rs Parser dialect + tests
hooks.rs Test dialect

Switch from GenericDialect to PostgreSqlDialect in all sqlparser usages
to ensure consistency with PRQL's PostgreSQL target dialect. This
eliminates potential edge cases where PostgreSQL-specific SQL syntax
from PRQL compilation might not be parsed correctly.
@claude
Copy link

claude bot commented Jan 17, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@ndenev ndenev merged commit 2410236 into master Jan 17, 2026
8 checks passed
@ndenev ndenev deleted the use-postgres-dialect branch January 17, 2026 23:30
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.

2 participants