pg_duckdb
pg_duckdb copied to clipboard
Add the `PostgresStorageExtension` to DuckDB
This PR aims to implement #56
It is still very barebones, a lot of the API's virtual methods are not implemented, but all existing tests are passing[1].
The existing functionality has been preserved as best as possible:
- the
PostgresIndexTableTableCatalogEntry will use thePostgresIndexScanFunction - the
PostgresHeapTableTableCatalogEntry will use thePostgresSeqScanFunction - VIEWs are still handled by the ReplacementScan, replacing the view with its view_definition, which will get bound again and hit a PostgresIndexTable / PostgresHeapTable
I could find no tests for the PostgresIndexScanFunction, it's possible that functionality has been broken, but I've tried to keep as much of the existing code in tact.
[1] The search_paths.sql test had to be partially disabled due to limitations in DuckDB that should be fixed upstream.
Also one of the tests, views.sql had a wrong result on main, the behavior there was wrong and was silently fixed by this PR