credativ / informix_fdw

Foreign Data Wrapper for Informix Databases
Other
28 stars 5 forks source link

TupleTableSlot has no member named tts_isnull #28

Open herwigg opened 4 years ago

herwigg commented 4 years ago

Hello, I have an issue compiling informix_fdw code on a centos 7 server, it is a greenplum cluster version 6.7 that uses postgres version 9.4.24 make install gives following error:

gcc -m64 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fno-aggressive-loop-optimizations -Wno-unused-but-set-variable -Wno-address -m64 -O3 -fargument-noalias-global -fno-omit-frame-pointer -g -std=gnu99 -Werror=uninitialized -Werror=implicit-function-declaration -fPIC -I/usr/ifx-csdk-current/incl/esql -I. -I./ -I/usr/local/greenplum-db-6.7.1/include/postgresql/server -I/usr/local/greenplum-db-6.7.1/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/tmp/build/f8c7ee08/gpdb_src/gpAux/ext/rhel7_x86_64/include -c -o ifx_conv.o ifx_conv.c In file included from ifx_conv.c:45:0: ifx_conv.c: In function ‘setIfxText’: ifx_conv.c:742:13: error: ‘TupleTableSlot’ has no member named ‘tts_isnull’ ((slot->tts_isnull[attnum]) ? INDICATOR_NULL : INDICATOR_NOT_NULL)); ^ ifx_fdw.h:375:111: note: in definition of macro ‘IFX_SET_INDICATOR_P’

define IFX_SET_INDICATOR_P(x, y, z) ((x)->stmt_info.ifxAttrDefs[PG_MAPPED_IFX_ATTNUM((x), (y))].indicator = (z))

                                                                                                           ^

make: *** [ifx_conv.o] Error 1

the installed informix client SDK is: clientsdk.4.10.FC11.LINUX/ LIBRARY_PATH is:

[root@o-gpm01-202004 informix_fdw-master]# echo $LD_LIBRARY_PATH /usr/ifx-csdk-current/lib:/usr/ifx-csdk-current/lib/esql:/usr/java/latest/lib/server:/usr/java/latest/jre/lib/amd64/server:/usr/local/greenplum-db/./lib:/usr/local/greenplum-db/./ext/python/lib:/usr/java/latest/lib/amd64/server:

I have no idea how to proceed with this error. Could yoo help out ? Thanks.

Herwig

psoo commented 4 years ago

Hmm yeah, i knew a while that directly accessing those structs and its fields isn't good style anymore. Instead, we should use the corresponding accessor functions (like slot_attisnull()). However, looks like GPDB still has named those functions differently, a short look into its code reveals they named it slot_get_isnull(), which returns a pointer to the NULL indicator array. The code still is different.

I'm going to look at it.

herwigg commented 4 years ago

Thank you very much

herwigg commented 4 years ago

Hello Everyone, Has there been some progress on this issue ? Have you had time to look at it ?

psoo commented 4 years ago

Currently there's a high load at work, so i couldn't get my hands on it yet. Please stay tuned, but it might take another couple of days.