alitrack / duckdb_fdw

DuckDB Foreign Data Wrapper for PostgreSQL
MIT License
272 stars 18 forks source link

Support postgresql 16 #24

Closed elysabethpc closed 6 months ago

elysabethpc commented 7 months ago

Hello, please do you plan to support also postgresql 16?

I'm using duckdb_fdw in postgresql 15.5 (with 0.9.2 duckdb version) and work like a charm for my pipeline. I would like to upgrade to postgresql 16.1.

I tried to build for postgresql 16, but seem there too many changes in the permission area in postgresql 16 https://github.com/postgres/postgres/commit/a61b1f74 https://www.postgresql.org/message-id/CA+HiwqGjJDmUhDSfv-U2qhKJjt9ST7Xh9JXC_irsAQ1TAUsJYg@mail.gmail.com

I got this error:

duckdb_fdw.c: In function ‘sqliteGetForeignRelSize’:
duckdb_fdw.c:552:53: error: ‘RangeTblEntry’ has no member named ‘checkAsUser’
  552 |                 Oid                     userid = rte->checkAsUser ? rte->checkAsUser : GetUserId();
      |                                                     ^~
duckdb_fdw.c:552:72: error: ‘RangeTblEntry’ has no member named ‘checkAsUser’
  552 |                 Oid                     userid = rte->checkAsUser ? rte->checkAsUser : GetUserId();
      |                                                                        ^~
duckdb_fdw.c: In function ‘sqlitePlanForeignModify’:
duckdb_fdw.c:1829:39: error: ‘RangeTblEntry’ has no member named ‘updatedCols’
 1829 |                 tmpset = bms_union(rte->updatedCols, rte->extraUpdatedCols);
      |                                       ^~
duckdb_fdw.c:1829:57: error: ‘RangeTblEntry’ has no member named ‘extraUpdatedCols’
 1829 |                 tmpset = bms_union(rte->updatedCols, rte->extraUpdatedCols);
      |                                                         ^~

Thank you for make this postgresql extension

ahuarte47 commented 7 months ago

Hi @elysabethpc this PR was merged, it is adding support for pg16, please, can you check?

elysabethpc commented 7 months ago

Thank you very much @ahuarte47 and @alitrac. Its working OK in postgresql 16.1 in fedora 38 x86_64, with duckdb 0.9.2. I didn't test it fully, but all the tests that I run by now work like a charm.