Skip to content

Conversation

Z-Xiao-M
Copy link
Contributor

This seems to be a PG bug. When a CTE expression with multiple unions is run, this line assertion will necessarily be triggered, causing the program to terminate.

…e unions is run, this line assertion will necessarily be triggered, causing the program to terminate.
@Z-Xiao-M
Copy link
Contributor Author

This seems to be a design flaw in pg_get_querydef, which does not adequately account for these scenarios

This seems to be a PG bug. When a CTE expression with multiple unions is run, this line assertion will necessarily be triggered, causing the program to terminate.

@Z-Xiao-M
Copy link
Contributor Author

#435

Copy link
Collaborator

@JelteF JelteF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice that you also created a patch for the upstream issue in Postgres: https://commitfest.postgresql.org/51/5383/

@JelteF JelteF merged commit 2da4473 into duckdb:main Nov 18, 2024
5 checks passed
JelteF pushed a commit that referenced this pull request Nov 23, 2024
After discussion on the pgsql-hackers mailinglist followed by #436, tom
lane proposed an additional change:

postgres/postgres@94131cd#diff-6c12827097e95912476267d73f3f56e8250b13aad37ab4286c3c7fdab7f30ec7R6367

Let's incorporate that change in our ruleutils files.
@Z-Xiao-M Z-Xiao-M deleted the assert branch June 18, 2025 08:24
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