Repository navigation
Do not wrap postgres_query SQL unless necessary - #620
Merged
Merged
Conversation
The query passed to `postgres_query()` function was being wrapped into a subquery with an explicit list of columns. This wrapping is necessary in some cases when a Postgres-side `CAST` is required for particular column. But it can be omitted in most of the usual cases. This PR enables the wrapping of the user query only when necessry. Ref: duckdblabs/duckdb-internal#11178
carlopi
pushed a commit
to maiadegraaf/duckdb
that referenced
this pull request
Oct 15, 2026
This PR updates Postgres and SQLite bringing in the following fixes: Postgres: - duckdb/duckdb-postgres#617 - duckdb/duckdb-postgres#620 - duckdb/duckdb-postgres#621 SQLite: - duckdb/duckdb-sqlite#256 - duckdb/duckdb-sqlite#258 Additonally SQLite patch `0003-check-file-access-of-local-databases` is absorbed.
carlopi
pushed a commit
to maiadegraaf/duckdb
that referenced
this pull request
Oct 15, 2026
This PR updates Postgres and SQLite bringing in the following fixes: Postgres: - duckdb/duckdb-postgres#617 - duckdb/duckdb-postgres#620 - duckdb/duckdb-postgres#621 SQLite: - duckdb/duckdb-sqlite#256 - duckdb/duckdb-sqlite#258 Additonally SQLite patch `0003-check-file-access-of-local-databases` is absorbed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The query passed to
postgres_query()function was being wrapped into a subquery with an explicit list of columns. This wrapping is necessary in some cases when a Postgres-sideCASTis required for particular column. But it can be omitted in most of the usual cases.This PR enables the wrapping of the user query only when necessry.
Ref: duckdblabs/duckdb-internal#11178