Skip to content

PostgreSQL: Parse statistics, view, and sequence statements - #9

Merged
amaksimo merged 1 commit into
dsql-async-indexfrom
feat/dsql-statistics-views-sequences
Oct 15, 2026
Merged

amaksimo merged 1 commit into
dsql-async-indexfrom
feat/dsql-statistics-views-sequences

Conversation

@amaksimo

Copy link
Copy Markdown
Owner

Why

Aurora DSQL runs PostgreSQL's extended statistics statements, recursive and
check-option views, the ALTER VIEW property forms, and ALTER SEQUENCE.
dsql-lint needs structured parser output for these statements to validate
them and apply DSQL's statistics target and sequence rules.

What

  • Parse CREATE, ALTER, and DROP STATISTICS, including PostgreSQL's
    statistics item forms (columns, windowless function calls, and parenthesized
    expressions) and a signed 32-bit statistics target.
  • Parse RECURSIVE views, WITH [CASCADED | LOCAL] CHECK OPTION, and
    value-less view options.
  • Parse the PostgreSQL ALTER VIEW property forms and ALTER SEQUENCE,
    keeping ALTER VIEW ... AS as its own statement.
  • Accept AS data_type and OWNED BY anywhere in CREATE SEQUENCE and
    ALTER SEQUENCE option lists, and reject repeated clauses.
  • Bump sqlparser-dsql to 0.62.12 for the linter update.

Testing

  • Parser tests cover the round trip, AST, and rejected forms of each statement
    family; the independent test audit proved every changed test.
  • Formatting, the all-feature suite, strict Clippy including the benchmark
    crate, and warning-denying Rustdoc pass.
  • thumbv6m-none-eabi no-std check and publish dry-run pass.
  • Every accepted and rejected form was checked against a live Aurora DSQL
    cluster.

References

Parse CREATE, ALTER, and DROP STATISTICS, RECURSIVE views, the
WITH [CASCADED | LOCAL] CHECK OPTION clause, value-less view options,
the ALTER VIEW property forms, and ALTER SEQUENCE.
@amaksimo
amaksimo merged commit 26f3b57 into dsql-async-index Oct 15, 2026
19 checks passed
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