pg_duckdb
pg_duckdb copied to clipboard
support "PREPARE" statement and "EXECUTE " statement
Current Behavior
postgres=# create extension pg_duckdb;
WARNING: To actually execute queries using DuckDB you need to run "SET duckdb.execution TO true;"
CREATE EXTENSION
postgres=# SET duckdb.execution TO true;
SET
postgres=# SELECT COUNT(*) FROM t;
count
-------
1000
(1 row)
postgres=# PREPARE test_stmt AS SELECT COUNT(*) FROM t;
PREPARE
postgres=# EXECUTE test_stmt;
count
-------
0
(1 row)
Thanks for the bug report. That's indeed something we should fix. However, the usage of prepared statements at the SQL level (i.e. PREPARE/EXECUTE queries) is a lot lower than at the protocol level (Parse/Bind/Execute messages). So I don't consider this a blocker for 0.1.0.