Skip to content

Fix ambiguity when parsing heredocs#84846

Merged
alexey-milovidov merged 8 commits intomasterfrom
fix-ambiguity-heredocs
Aug 2, 2025
Merged

Fix ambiguity when parsing heredocs#84846
alexey-milovidov merged 8 commits intomasterfrom
fix-ambiguity-heredocs

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Jul 31, 2025

Changelog category (leave one):

  • Backward Incompatible Change

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

ClickHouse supports PostgreSQL-style heredoc syntax: $tag$ string contents... $tag$, also known as dollar-quoted string literals. In previous versions, there were fewer restrictions on tags: they could contain arbitrary characters, including punctuation and whitespace. This introduces parsing ambiguity with identifiers that can also start with a dollar character. At the same time, PostgreSQL only allows word characters for tags. To resolve the problem, we now restrict heredoc tags only to contain word characters. Closes #84731.

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jul 31, 2025

Workflow [PR], commit [00930df]

Summary:

job_name test_name status info comment
Stateless tests (amd_binary, ParallelReplicas, s3 storage, parallel) failure
Logical error thrown (see clickhouse-server.log or logical_errors.txt) FAIL

@clickhouse-gh clickhouse-gh bot added the pr-backward-incompatible Pull request with backwards incompatible changes label Jul 31, 2025
@alexey-milovidov alexey-milovidov self-assigned this Aug 2, 2025
@alexey-milovidov alexey-milovidov merged commit 7d99342 into master Aug 2, 2025
121 of 124 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-ambiguity-heredocs branch August 2, 2025 16:47
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backward-incompatible Pull request with backwards incompatible changes pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syntax Error query exception when number of reused parameters >=2 in Union

2 participants