Skip to content

fix: scope postgres array suffix spacing - #2780

Open
mtibben wants to merge 1 commit into
quarylabs:mainfrom
mtibben:mtibben/postgres-array-type-suffix-spacing
Open

fix: scope postgres array suffix spacing#2780
mtibben wants to merge 1 commit into
quarylabs:mainfrom
mtibben:mtibben/postgres-array-type-suffix-spacing

Conversation

@mtibben

@mtibben mtibben commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

PostgreSQL array datatype suffixes should keep their type-suffix shape without changing square-bracket spacing for array literals in other dialects.

Postgres supports datatype suffixes like TEXT[] and integer[3][3], but treating the raw [ token globally as touch-before also changes array literals such as SELECT [1, 2, 3] AS arr in dialects where the leading space is expected. This introduces a Postgres-specific array_type_suffix segment so layout can keep datatype suffixes tight while leaving general square-bracket spacing alone.

This keeps the spacing behavior focused on the Postgres datatype construct and adds regression coverage for BigQuery, SparkSQL, and DuckDB array literals.

@mtibben
mtibben marked this pull request as ready for review June 23, 2026 00:21
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