pg_duckdb icon indicating copy to clipboard operation
pg_duckdb copied to clipboard

Automatically enable DuckDB execution when DuckDB-only functions are used

Open JelteF opened this issue 1 year ago • 1 comments
trafficstars

Since #86 we disable duckdb.execution by default, because existing queries might fail in DuckDB. However, if people use a DuckDB-only function such as read_parquet there's no reason to try running it in Postgres, because it only works when run in DuckDB.

This starts enabling DuckDB execution for queries automatically when such a function is used. And also adds test coverage in general for read_csv and read_parquet.

JelteF avatar Aug 14 '24 12:08 JelteF

@mkaruza I realized the initial version of this PR would conflict with your #99 PR, since you're changing the argument types there. Keeping these argument types in sync seems like it could get annoying and also not very readable. So instead I changed the code a bit to not need the argument types.

JelteF avatar Aug 15 '24 10:08 JelteF