duckdb / pg_duckdb

DuckDB-powered Postgres for high performance apps & analytics.
MIT License
1.23k stars 47 forks source link

Automatically enable DuckDB execution when DuckDB-only functions are used #123

Closed JelteF closed 4 weeks ago

JelteF commented 1 month ago

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 commented 1 month ago

@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.