permuteseq icon indicating copy to clipboard operation
permuteseq copied to clipboard

PostgreSQL 10 compatibility

Open ArturFormella opened this issue 8 years ago • 1 comments

Hello! I get the following error when trying to build with PostgreSQL 10

$make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fpic -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o permuteseq.o permuteseq.c
In file included from /usr/local/pgsql/include/server/access/skey.h:19:0,
                 from /usr/local/pgsql/include/server/access/genam.h:18,
                 from /usr/local/pgsql/include/server/access/amapi.h:15,
                 from /usr/local/pgsql/include/server/access/hash.h:20,
                 from permuteseq.c:12:
permuteseq.c: In function ‘permute_nextval’:
permuteseq.c:75:31: error: ‘pg_sequence_parameters’ undeclared (first use in this function)
  params = DirectFunctionCall1(pg_sequence_parameters, seq_oid);
                               ^
/usr/local/pgsql/include/server/fmgr.h:585:26: note: in definition of macro ‘DirectFunctionCall1’
  DirectFunctionCall1Coll(func, InvalidOid, arg1)
                          ^~~~
permuteseq.c:75:31: note: each undeclared identifier is reported only once for each function it appears in
  params = DirectFunctionCall1(pg_sequence_parameters, seq_oid);
                               ^
/usr/local/pgsql/include/server/fmgr.h:585:26: note: in definition of macro ‘DirectFunctionCall1’
  DirectFunctionCall1Coll(func, InvalidOid, arg1)
                          ^~~~
In file included from permuteseq.c:11:0:
permuteseq.c:87:46: error: ‘nextval_oid’ undeclared (first use in this function)
  nextval = DatumGetInt64(DirectFunctionCall1(nextval_oid, seq_oid));
                                              ^
/usr/local/pgsql/include/server/postgres.h:382:38: note: in definition of macro ‘GET_8_BYTES’
 #define GET_8_BYTES(datum) ((Datum) (datum))
                                      ^~~~~
permuteseq.c:87:12: note: in expansion of macro ‘DatumGetInt64’
  nextval = DatumGetInt64(DirectFunctionCall1(nextval_oid, seq_oid));
            ^~~~~~~~~~~~~
permuteseq.c:87:26: note: in expansion of macro ‘DirectFunctionCall1’
  nextval = DatumGetInt64(DirectFunctionCall1(nextval_oid, seq_oid));
                          ^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/pgsql/include/server/access/skey.h:19:0,
                 from /usr/local/pgsql/include/server/access/genam.h:18,
                 from /usr/local/pgsql/include/server/access/amapi.h:15,
                 from /usr/local/pgsql/include/server/access/hash.h:20,
                 from permuteseq.c:12:
permuteseq.c: In function ‘reverse_permute’:
permuteseq.c:125:31: error: ‘pg_sequence_parameters’ undeclared (first use in this function)
  params = DirectFunctionCall1(pg_sequence_parameters, seq_oid);
                               ^
/usr/local/pgsql/include/server/fmgr.h:585:26: note: in definition of macro ‘DirectFunctionCall1’
  DirectFunctionCall1Coll(func, InvalidOid, arg1)
                          ^~~~
<builtin>: recipe for target 'permuteseq.o' failed
make: *** [permuteseq.o] Error 1

My pg_config

$ pg_config
BINDIR = /usr/local/pgsql/bin
DOCDIR = /usr/local/pgsql/share/doc
HTMLDIR = /usr/local/pgsql/share/doc
INCLUDEDIR = /usr/local/pgsql/include
PKGINCLUDEDIR = /usr/local/pgsql/include
INCLUDEDIR-SERVER = /usr/local/pgsql/include/server
LIBDIR = /usr/local/pgsql/lib
PKGLIBDIR = /usr/local/pgsql/lib
LOCALEDIR = /usr/local/pgsql/share/locale
MANDIR = /usr/local/pgsql/share/man
SHAREDIR = /usr/local/pgsql/share
SYSCONFDIR = /usr/local/pgsql/etc
PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-systemd' '--with-icu' '--with-uuid=ossp' '--with-libxml' '--with-libxslt' '--with-wal-segsize=64'
CC = gcc
CPPFLAGS = -DFRONTEND -D_GNU_SOURCE -I/usr/include/libxml2
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2
CFLAGS_SL = -fpic
LDFLAGS = -L../../src/common -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lpthread -lxslt -lxml2 -lz -lreadline -lrt -lcrypt -ldl -lm
VERSION = PostgreSQL 10devel

Thanks in advance!

ArturFormella avatar Jun 03 '17 11:06 ArturFormella

Fixed by 91828aebb9b568e8b256d82a3b3dcc6a5d24ac42 Thanks for the report!

dverite avatar Jun 04 '17 14:06 dverite