pg_duckdb
pg_duckdb copied to clipboard
Automatically enable DuckDB execution when DuckDB-only functions are used
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.
@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.