Skip to content

PostgreSQL: Support ALTER TABLE ... RESET and storage parameters without a value - #2744

Open
LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/alter-table-reset-bare-reloptions
Open

LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/alter-table-reset-bare-reloptions

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

ALTER TABLE t RESET (fillfactor) fails with Expected: ADD, RENAME, PARTITION, SWAP, DROP, REPLICA IDENTITY, SET, or SET TBLPROPERTIES after ALTER TABLE, found: RESET, and a storage parameter named without a value, as in CREATE VIEW v WITH (security_invoker) AS SELECT 1 or ALTER TABLE t SET (autovacuum_enabled), fails with Expected: =. PostgreSQL documents RESET ( storage_parameter [, ... ] ) for ALTER TABLE and reads a storage parameter given without a value as true.

RESET parses into a new AlterTableOperation::ResetOptions holding the parameter names, the shape #2730 uses for ALTER VIEW ... RESET. A key with no = after it parses to the existing SqlOption::Ident behind a new Dialect::supports_sql_option_without_value, which PostgreSQL and Generic enable, so the other dialects still report the missing =. PostgreSQL's grammar also accepts a bare key in CREATE TEXT SEARCH options, so the negative test there now runs on the dialects without the flag.

@LucaCappelletti94 LucaCappelletti94 added enhancement New feature or request PostgreSQL labels Oct 27, 2026
@codecov-commenter

codecov-commenter commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.47%. Comparing base (a1b99f2) to head (b2477c0).

Files with missing lines Patch % Lines
src/ast/spans.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2744   +/-   ##
=======================================
  Coverage   82.46%   82.47%           
=======================================
  Files          42       42           
  Lines       35458    35480   +22     
  Branches    35458    35480   +22     
=======================================
+ Hits        29242    29263   +21     
- Misses       2679     2681    +2     
+ Partials     3537     3536    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/alter-table-reset-bare-reloptions branch 4 times, most recently from 9439ca4 to 8b0f1ad Compare October 28, 2026 21:36
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/alter-table-reset-bare-reloptions branch from 8b0f1ad to b2477c0 Compare October 28, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PostgreSQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants