cyga / www_fdw

fdw extension for postgres
http://wiki.postgresql.org/wiki/WWW_FDW
123 stars 21 forks source link

Support for 9.2 #1

Closed aschreyer closed 12 years ago

aschreyer commented 12 years ago

I can build the extension with 9.1 but with the new 9.2 beta I get the following error when trying to compile:

cp sql/www_fdw.sql sql/www_fdw--0.1.0.sql
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -DLINUX_OOM_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I/usr/include/libxml2 -I. -I. -I/usr/include/postgresql/9.2/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.5  -c -o src/json_parser.o src/json_parser.c
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -DLINUX_OOM_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I/usr/include/libxml2 -I. -I. -I/usr/include/postgresql/9.2/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.5  -c -o src/serialize_quals.o src/serialize_quals.c
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -DLINUX_OOM_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I/usr/include/libxml2 -I. -I. -I/usr/include/postgresql/9.2/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.5  -c -o src/www_fdw.o src/www_fdw.c
src/www_fdw.c:126:1: error: unknown type name ‘FdwPlan’
src/www_fdw.c: In function ‘www_fdw_handler’:
src/www_fdw.c:307:12: error: ‘FdwRoutine’ has no member named ‘PlanForeignScan’
src/www_fdw.c: At top level:
src/www_fdw.c:432:1: error: unknown type name ‘FdwPlan’
src/www_fdw.c: In function ‘www_plan’:
src/www_fdw.c:435:2: error: unknown type name ‘FdwPlan’
src/www_fdw.c:439:12: error: ‘FdwPlan’ undeclared (first use in this function)
src/www_fdw.c:439:12: note: each undeclared identifier is reported only once for each function it appears in
src/www_fdw.c:439:12: error: expected expression before ‘)’ token
src/www_fdw.c:440:9: error: request for member ‘fdw_private’ in something not a structure or union
make: *** [src/www_fdw.o] Error 1
cyga commented 12 years ago

Yes, you are right. This is because of:

--snip I just wanted to alert you that with commit b14953932dfdda7d915b9e276a09df8458efeec8 (http://archives.postgresql.org/pgsql-committers/2012-03/msg00054.php) The API for foreign data wrappers has changed in an incompatible way.

If you want your code to work with PostgreSQL 9.2 and above, you'll have to adjust it. The development docs have some information about that: http://www.postgresql.org/docs/devel/static/fdwhandler.html It's also helpful to read the changes to file_fdw. --snap

And I hadn't time yet to update it.

cyga commented 12 years ago

updated. Git tag "9.1" is available for 9.1 postgresql version.