Skip to content

Preserve parentheses around subscripted array constructors - #359

Open
msepga wants to merge 1 commit into
17-latestfrom
fix-deparse-array-constructor-subscript
Open

Preserve parentheses around subscripted array constructors#359
msepga wants to merge 1 commit into
17-latestfrom
fix-deparse-array-constructor-subscript

Conversation

@msepga

@msepga msepga commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Array constructors require parentheses when used as the target of an indirection. Without them, deparsing (ARRAY[...])[...] produces SQL that cannot be parsed again.

Here we backport the A_ArrayExpr handling from the Postgres 18 branch and add a parse/deparse round-trip regression test.

Array constructors require parentheses when used as the target of an
indirection. Without them, deparsing `(ARRAY[...])[...]` produces SQL
that cannot be parsed again.

Here we backport the A_ArrayExpr handling from the Postgres 18 branch
and add a parse/deparse round-trip regression test.
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