pramsey / pgsql-ogr-fdw

PostgreSQL foreign data wrapper for OGR
MIT License
237 stars 34 forks source link

PostgreSQL 17 support #258

Closed devrimgunduz closed 3 months ago

devrimgunduz commented 3 months ago

Hi @pramsey ,

ogr_fdw fails to build against PostgreSQL 17. Beta2 is out today. Can you please take a look? Thanks!

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -I/usr/gdal38/include -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP  -I/usr/include  -c -o stringbuffer.o stringbuffer.c
ogr_fdw.c:960:42: error: too few arguments to function call, expected 11, have 10
  947 |                  (Path*) create_foreignscan_path(root, baserel,
      |                          ~~~~~~~~~~~~~~~~~~~~~~~
  948 | #if PG_VERSION_NUM >= 90600
  949 |                          NULL, /* PathTarget */
  950 | #endif
  951 |                          baserel->rows,
  952 |                          planstate->startup_cost,
  953 |                          planstate->total_cost,
  954 |                          NIL,     /* no pathkeys */
  955 |                          NULL,    /* no outer rel either */
  956 |                          NULL  /* no extra plan */
  957 | #if PG_VERSION_NUM >= 90500
  958 |                          , NIL /* no fdw_private list */
  959 | #endif
  960 |                                                 )
      |                                                 ^
/usr/pgsql-17/include/server/optimizer/pathnode.h:125:21: note: 'create_foreignscan_path' declared here
  125 | extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
      |                     ^                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  126 |                                                                                         PathTarget *target,
      |                                                                                         ~~~~~~~~~~~~~~~~~~~
  127 |                                                                                         double rows, Cost startup_cost, Cost total_cost,
      |                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128 |                                                                                         List *pathkeys,
      |                                                                                         ~~~~~~~~~~~~~~~
  129 |                                                                                         Relids required_outer,
      |                                                                                         ~~~~~~~~~~~~~~~~~~~~~~
  130 |                                                                                         Path *fdw_outerpath,
      |                                                                                         ~~~~~~~~~~~~~~~~~~~~
  131 |                                                                                         List *fdw_restrictinfo,
      |                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~
  132 |                                                                                         List *fdw_private);
      |                                                                                         ~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: ogr_fdw.bc] Error 1
make[1]: *** Waiting for unfinished jobs....
ogr_fdw.c: In function ‘ogrGetForeignPaths’:
ogr_fdw.c:947:26: error: too few arguments to function ‘create_foreignscan_path’
  947 |                  (Path*) create_foreignscan_path(root, baserel,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ogr_fdw.h:45,
                 from ogr_fdw.c:40:
/usr/pgsql-17/include/server/optimizer/pathnode.h:125:21: note: declared here
  125 | extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [<builtin>: ogr_fdw.o] Error 1
pramsey commented 3 months ago

Thanks for the heads up, should be good to go with 1.1.5 release https://github.com/pramsey/pgsql-ogr-fdw/releases/tag/v1.1.5