pg_duckdb icon indicating copy to clipboard operation
pg_duckdb copied to clipboard

Add the `PostgresStorageExtension` to DuckDB

Open Tishj opened this issue 1 year ago • 4 comments

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 PostgresIndexTable TableCatalogEntry will use the PostgresIndexScanFunction
  • the PostgresHeapTable TableCatalogEntry will use the PostgresSeqScanFunction
  • 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

Tishj avatar Aug 07 '24 08:08 Tishj