duckdb / postgres_scanner

MIT License
194 stars 35 forks source link

postgres scanner not work on partition table #220

Open wonb168 opened 2 months ago

wonb168 commented 2 months ago

The full table copy operation performed by the DuckDB PostgreSQL extension on partitioned tables, such as

SELECT * 
FROM pg.sch.tb a 
left join b on a.x=b.x
where a.dt=current_date

, checks the process for full table copy. Under what conditions is it pushed down? now, this sql need like this:

with a as (select * from postgres_query('pg',$$select * from sch.tb$$))
select * from a 
left join b on a.x=b.x