pramsey / pgsql-ogr-fdw

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

Doesn't compile against PostgreSQL 11 head #148

Closed robe2 closed 6 years ago

robe2 commented 6 years ago

This is as of git head December 19th ish.

ogr_fdw.c: In function 'ogrReadColumnData': ogr_fdw.c:1136:33: error: incompatible types when initializing type 'Form_pg_attribute' using type 'FormData_pg_attribute' Form_pg_attribute att_tuple = tupdesc->attrs[i]; ^ ogr_fdw.c: In function 'ogrGetFidColumn': ogr_fdw.c:2102:34: error: invalid type argument of '->' (have 'FormData_pg_attribute') NameData attname = td->attrs[i]->attname; ^ ogr_fdw.c:2103:31: error: invalid type argument of '->' (have 'FormData_pg_attribute') Oid atttypeid = td->attrs[i]->atttypid; ^ ogr_fdw.c: In function 'ogrAddForeignUpdateTargets': ogr_fdw.c:2138:6: error: incompatible types when assigning to type 'Form_pg_attribute' from type 'FormData_pg_attribute' att = tupdesc->attrs[fid_column]; ^ ogr_fdw.c: In function 'ogrExecForeignUpdate': ogr_fdw.c:2221:34: error: invalid type argument of '->' (have 'FormData_pg_attribute') fid_type = td->attrs[fid_column]->atttypid; ^ ogr_fdw.c: In function 'ogrExecForeignDelete': ogr_fdw.c:2420:34: error: invalid type argument of '->' (have 'FormData_pg_attribute') fid_type = td->attrs[fid_column]->atttypid; ^

: recipe for target 'ogr_fdw.o' failed make: *** [ogr_fdw.o] Error 1 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -I/projects/gdal/rel-2.2.2w64gcc48/include -I. -I./ -IC:/MING64~1/projects/POSTGR~1/rel/PG11W6~1/include/server -IC:/MING64~1/projects/POSTGR~1/rel/PG11W6~1/include/internal -I./src/include/port/win32 -DEXEC_BACKEND -I/projects/libxml/rel-libxml2-2.7.8w64gcc48/include/libxml2 -IC:/MING64~1/projects/POSTGR~1/rel/PG11W6~1/include/server/port/win32 -c -o ogr_fdw.o ogr_fdw.c ogr_fdw.c: In function 'ogrReadColumnData': ogr_fdw.c:1136:33: error: incompatible types when initializing type 'Form_pg_attribute' using type 'FormData_pg_attribute' Form_pg_attribute att_tuple = tupdesc->attrs[i]; ^ ogr_fdw.c: In function 'ogrGetFidColumn': ogr_fdw.c:2102:34: error: invalid type argument of '->' (have 'FormData_pg_attribute') NameData attname = td->attrs[i]->attname; ^ ogr_fdw.c:2103:31: error: invalid type argument of '->' (have 'FormData_pg_attribute') Oid atttypeid = td->attrs[i]->atttypid; ^ ogr_fdw.c: In function 'ogrAddForeignUpdateTargets': ogr_fdw.c:2138:6: error: incompatible types when assigning to type 'Form_pg_attribute' from type 'FormData_pg_attribute' att = tupdesc->attrs[fid_column]; ^ ogr_fdw.c: In function 'ogrExecForeignUpdate': ogr_fdw.c:2221:34: error: invalid type argument of '->' (have 'FormData_pg_attribute') fid_type = td->attrs[fid_column]->atttypid; ^ ogr_fdw.c: In function 'ogrExecForeignDelete': ogr_fdw.c:2420:34: error: invalid type argument of '->' (have 'FormData_pg_attribute') fid_type = td->attrs[fid_column]->atttypid; ^ : recipe for target 'ogr_fdw.o' failed
pramsey commented 6 years ago

Huh, check again, I just built and regressed against the latest pull of master.

============== dropping database "contrib_regression" ==============
NOTICE:  database "contrib_regression" does not exist, skipping
DROP DATABASE
============== creating database "contrib_regression" ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries        ==============
test file                     ... ok
test pgsql                    ... ok
test import                   ... ok

=====================
 All 3 tests passed. 
=====================

Pauls-iMac:~/Code/pgsql-ogr-fdw pramsey(master)$ which pg_config
/opt/pgsql/11/bin/pg_config
Pauls-iMac:~/Code/pgsql-ogr-fdw pramsey(master)$ pg_config --version
PostgreSQL 11devel
robe2 commented 6 years ago

Sorry for the false alarm. I was pointing at the wrong ogr_fdw git branch. But I did rebuild from PostgresQL master before I discovered my mistake and looks fine.