Skip to content

Redshift: Support nested block comments - #3061

Open
yussypu wants to merge 1 commit into
apache:mainfrom
yussypu:redshift-nested-comments
Open

yussypu wants to merge 1 commit into
apache:mainfrom
yussypu:redshift-nested-comments

Conversation

@yussypu

@yussypu yussypu commented Nov 27, 2026

Copy link
Copy Markdown

Dialects: Redshift

Closes #2959

RedshiftSqlDialect does not set supports_nested_comments, so a block comment ended at the first */. select 1 /* /* */ , ' */ , pg_backend_pid() -- ' parsed as SELECT 1, ' */ , pg_backend_pid() -- ', while Redshift returns two columns because the comment runs to the second */. Redshift follows PostgreSQL here, which documents nested block comments: https://www.postgresql.org/docs/8.0/sql-syntax.html#SQL-SYNTAX-COMMENTS

This enables supports_nested_comments for Redshift, with a test covering both forms from the issue and a fuzz seed.

AI assistance: drafted with Claude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redshift dialect: support nested block comments

1 participant