Skip to content

rust: Use SQL formatting#35191

Open
def- wants to merge 3 commits intoMaterializeInc:mainfrom
def-:pr-sql-formatting
Open

rust: Use SQL formatting#35191
def- wants to merge 3 commits intoMaterializeInc:mainfrom
def-:pr-sql-formatting

Conversation

@def-
Copy link
Contributor

@def- def- commented Feb 24, 2026

For context see https://materializeinc.slack.com/archives/C08A62E0751/p1771412204274059

For our internal SQL we should probably switch to a proper SQL query builder that automatically does the escaping

The interface is inspired by https://www.psycopg.org/psycopg3/docs/api/sql.html, but uses macros for compile-time guarantees. The idea is to enforce building SQL strings properly, without injection.

@github-actions
Copy link

Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone.

PR title guidelines

  • Use imperative mood: "Fix X" not "Fixed X" or "Fixes X"
  • Be specific: "Fix panic in catalog sync when controller restarts" not "Fix bug" or "Update catalog code"
  • Prefix with area if helpful: compute: , storage: , adapter: , sql:

Pre-merge checklist

  • The PR title is descriptive and will make sense in the git log.
  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).

@def- def- force-pushed the pr-sql-formatting branch 4 times, most recently from b346bd2 to 46a9c9d Compare February 24, 2026 16:28
@def- def- force-pushed the pr-sql-formatting branch from 46a9c9d to f8a994b Compare February 24, 2026 22:22
@def- def- marked this pull request as ready for review February 25, 2026 08:01
@def- def- requested review from a team and ggevay as code owners February 25, 2026 08:01
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.

1 participant