Description
I've been using Duckdb with dbt. When I attach a Postgresql catalogue and query it via native Duckdb syntax without using Postgresql scanner or Postgresql query functions, Duckdb does not seem to push down the filter in simple scenarios. Example.
using v1.2
We have large database each table has a partition per customer. So every query we run on a per tenant basis should have it's partition key filtering on.
--works fine
SELECT * FROM postgres_query('mydb','select * from tenant.table where tnt_id= ''{{var("tnt_id")}}'' ')
--tnt_id not pushed down to copy command
Select * from mydb.tenant.table where tnt_id=''{{var("tnt_id")}}''
The data type of the column being filtered on is a uuid.
We have set pg_use_ctid_scan to false as it does not work efficiently with our partitioned database and have pg_experimental_filter_pushdown set to false.
Not sure if this is a bug or not.