Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PostgreSQL 17 Compatibility #50

Open
Vonng opened this issue Oct 14, 2024 · 0 comments
Open

Add PostgreSQL 17 Compatibility #50

Vonng opened this issue Oct 14, 2024 · 0 comments

Comments

@Vonng
Copy link

Vonng commented Oct 14, 2024

Fail to build against PostgreSQL 17

[kafka_fdw for PG17] ===========================================
$ rpmbuild --with debuginfo --define "pgmajorversion 17" -ba ~/rpmbuild/SPECS/kafka_fdw.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.OCMOhn
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd /home/vagrant/rpmbuild/BUILD
+ rm -rf kafka_fdw-0.0.3
+ /usr/bin/gzip -dc /home/vagrant/rpmbuild/SOURCES/kafka_fdw-0.0.3.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd kafka_fdw-0.0.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.03Ti76
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd kafka_fdw-0.0.3
+ PATH=/usr/pgsql-17/bin:/home/vagrant/.cargo/bin:/home/vagrant/.local/bin:/home/vagrant/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
+ /usr/bin/make -j10
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 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/connection.o src/connection.c
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 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/kafka_fdw.o src/kafka_fdw.c
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 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/kafka_expr.o src/kafka_expr.c
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 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/option.o src/option.c
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 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/parser.o src/parser.c
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 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/planning.o src/planning.c
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 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/utils.o src/utils.c
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o src/connection.bc src/connection.c
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o src/kafka_fdw.bc src/kafka_fdw.c
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o src/kafka_expr.bc src/kafka_expr.c
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o src/option.bc src/option.c
src/utils.c: In function 'kafka_get_watermarks':
src/utils.c:93:9: warning: implicit declaration of function 'tuplestore_donestoring'; did you mean 'tuplestore_rescan'? [-Wimplicit-function-declaration]
         tuplestore_donestoring(tupstore);
         ^~~~~~~~~~~~~~~~~~~~~~
         tuplestore_rescan
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o src/parser.bc src/parser.c
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o src/planning.bc src/planning.c
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -std=c99 -Wall -Wextra -Wno-unused-parameter -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o src/utils.bc src/utils.c
In file included from src/kafka_fdw.c:2:
src/kafka_fdw.c: In function 'kafkaGetForeignPaths':
src/compatibility.h:54:6: error: too few arguments to function 'create_foreignscan_path'
     (create_foreignscan_path(planner_info,                                                                             \
      ^~~~~~~~~~~~~~~~~~~~~~~
src/kafka_fdw.c:205:9: note: in expansion of macro 'kafka_create_foreignscan_path'
         kafka_create_foreignscan_path(root,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/kafka_fdw.h:25,
                 from src/kafka_fdw.c:1:
/usr/pgsql-17/include/server/optimizer/pathnode.h:125:21: note: declared here
 extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
                     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/kafka_fdw.c:2:
src/compatibility.h:54:6: error: too few arguments to function 'create_foreignscan_path'
     (create_foreignscan_path(planner_info,                                                                             \
      ^~~~~~~~~~~~~~~~~~~~~~~
src/kafka_fdw.c:223:13: note: in expansion of macro 'kafka_create_foreignscan_path'
             kafka_create_foreignscan_path(root,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/kafka_fdw.h:25,
                 from src/kafka_fdw.c:1:
/usr/pgsql-17/include/server/optimizer/pathnode.h:125:21: note: declared here
 extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
                     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/pgsql-17/include/server/postgres.h:46,
                 from src/kafka_fdw.h:4,
                 from src/kafka_fdw.c:1:
src/kafka_fdw.c: In function 'kafkaAcquireSampleRowsFunc':
/usr/pgsql-17/include/server/utils/elog.h:387:15: warning: declaration of '_save_exception_stack' shadows a previous local [-Wshadow=compatible-local]
   sigjmp_buf *_save_exception_stack##__VA_ARGS__ = PG_exception_stack; \
               ^~~~~~~~~~~~~~~~~~~~~
src/kafka_fdw.c:1657:21: note: in expansion of macro 'PG_TRY'
                     PG_TRY();
                     ^~~~~~
/usr/pgsql-17/include/server/utils/elog.h:387:15: note: shadowed declaration is here
   sigjmp_buf *_save_exception_stack##__VA_ARGS__ = PG_exception_stack; \
               ^~~~~~~~~~~~~~~~~~~~~
src/kafka_fdw.c:1565:5: note: in expansion of macro 'PG_TRY'
     PG_TRY();
     ^~~~~~
/usr/pgsql-17/include/server/utils/elog.h:388:25: warning: declaration of '_save_context_stack' shadows a previous local [-Wshadow=compatible-local]
   ErrorContextCallback *_save_context_stack##__VA_ARGS__ = error_context_stack; \
                         ^~~~~~~~~~~~~~~~~~~
src/kafka_fdw.c:1657:21: note: in expansion of macro 'PG_TRY'
                     PG_TRY();
                     ^~~~~~
/usr/pgsql-17/include/server/utils/elog.h:388:25: note: shadowed declaration is here
   ErrorContextCallback *_save_context_stack##__VA_ARGS__ = error_context_stack; \
                         ^~~~~~~~~~~~~~~~~~~
src/kafka_fdw.c:1565:5: note: in expansion of macro 'PG_TRY'
     PG_TRY();
     ^~~~~~
/usr/pgsql-17/include/server/utils/elog.h:389:14: warning: declaration of '_local_sigjmp_buf' shadows a previous local [-Wshadow=compatible-local]
   sigjmp_buf _local_sigjmp_buf##__VA_ARGS__; \
              ^~~~~~~~~~~~~~~~~
src/kafka_fdw.c:1657:21: note: in expansion of macro 'PG_TRY'
                     PG_TRY();
                     ^~~~~~
/usr/pgsql-17/include/server/utils/elog.h:389:14: note: shadowed declaration is here
   sigjmp_buf _local_sigjmp_buf##__VA_ARGS__; \
              ^~~~~~~~~~~~~~~~~
src/kafka_fdw.c:1565:5: note: in expansion of macro 'PG_TRY'
     PG_TRY();
     ^~~~~~
/usr/pgsql-17/include/server/utils/elog.h:390:8: warning: declaration of '_do_rethrow' shadows a previous local [-Wshadow=compatible-local]
   bool _do_rethrow##__VA_ARGS__ = false; \
        ^~~~~~~~~~~
src/kafka_fdw.c:1657:21: note: in expansion of macro 'PG_TRY'
                     PG_TRY();
                     ^~~~~~
/usr/pgsql-17/include/server/utils/elog.h:390:8: note: shadowed declaration is here
   bool _do_rethrow##__VA_ARGS__ = false; \
        ^~~~~~~~~~~
src/kafka_fdw.c:1565:5: note: in expansion of macro 'PG_TRY'
     PG_TRY();
     ^~~~~~
make: *** [<builtin>: src/kafka_fdw.o] Error 1
make: *** Waiting for unfinished jobs....
src/parser.c:34:5: error: redeclaration of enumerator 'JSONTYPE_NULL'
     JSONTYPE_NULL,    /* null, so we didn't bother to identify */
     ^~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:70:2: note: previous definition of 'JSONTYPE_NULL' was here
  JSONTYPE_NULL,    /* null, so we didn't bother to identify */
  ^~~~~~~~~~~~~
src/parser.c:35:5: error: redeclaration of enumerator 'JSONTYPE_BOOL'
     JSONTYPE_BOOL,    /* boolean (built-in types only) */
     ^~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:71:2: note: previous definition of 'JSONTYPE_BOOL' was here
  JSONTYPE_BOOL,    /* boolean (built-in types only) */
  ^~~~~~~~~~~~~
src/parser.c:36:5: error: redeclaration of enumerator 'JSONTYPE_NUMERIC'
     JSONTYPE_NUMERIC, /* numeric (ditto) */
     ^~~~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:72:2: note: previous definition of 'JSONTYPE_NUMERIC' was here
  JSONTYPE_NUMERIC,   /* numeric (ditto) */
  ^~~~~~~~~~~~~~~~
src/parser.c:37:5: error: redeclaration of enumerator 'JSONTYPE_DATE'
     JSONTYPE_DATE,    /* we use special formatting for datetimes */
     ^~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:73:2: note: previous definition of 'JSONTYPE_DATE' was here
  JSONTYPE_DATE,    /* we use special formatting for datetimes */
  ^~~~~~~~~~~~~
src/parser.c:38:5: error: redeclaration of enumerator 'JSONTYPE_TIMESTAMP'
     JSONTYPE_TIMESTAMP,
     ^~~~~~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:74:2: note: previous definition of 'JSONTYPE_TIMESTAMP' was here
  JSONTYPE_TIMESTAMP,
  ^~~~~~~~~~~~~~~~~~
src/parser.c:39:5: error: redeclaration of enumerator 'JSONTYPE_TIMESTAMPTZ'
     JSONTYPE_TIMESTAMPTZ,
     ^~~~~~~~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:75:2: note: previous definition of 'JSONTYPE_TIMESTAMPTZ' was here
  JSONTYPE_TIMESTAMPTZ,
  ^~~~~~~~~~~~~~~~~~~~
src/parser.c:40:5: error: redeclaration of enumerator 'JSONTYPE_JSON'
     JSONTYPE_JSON,      /* JSON itself (and JSONB) */
     ^~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:76:2: note: previous definition of 'JSONTYPE_JSON' was here
  JSONTYPE_JSON,    /* JSON (and JSONB, if not is_jsonb) */
  ^~~~~~~~~~~~~
src/parser.c:41:5: error: redeclaration of enumerator 'JSONTYPE_ARRAY'
     JSONTYPE_ARRAY,     /* array */
     ^~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:78:2: note: previous definition of 'JSONTYPE_ARRAY' was here
  JSONTYPE_ARRAY,    /* array */
  ^~~~~~~~~~~~~~
src/parser.c:42:5: error: redeclaration of enumerator 'JSONTYPE_COMPOSITE'
     JSONTYPE_COMPOSITE, /* composite */
     ^~~~~~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:79:2: note: previous definition of 'JSONTYPE_COMPOSITE' was here
  JSONTYPE_COMPOSITE,   /* composite */
  ^~~~~~~~~~~~~~~~~~
src/parser.c:43:5: error: redeclaration of enumerator 'JSONTYPE_CAST'
     JSONTYPE_CAST,      /* something with an explicit cast to JSON */
     ^~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:80:2: note: previous definition of 'JSONTYPE_CAST' was here
  JSONTYPE_CAST,    /* something with an explicit cast to JSON */
  ^~~~~~~~~~~~~
src/parser.c:44:5: error: redeclaration of enumerator 'JSONTYPE_OTHER'
     JSONTYPE_OTHER      /* all else */
     ^~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:81:2: note: previous definition of 'JSONTYPE_OTHER' was here
  JSONTYPE_OTHER,    /* all else */
  ^~~~~~~~~~~~~~
src/parser.c:45:3: error: conflicting types for 'JsonTypeCategory'
 } JsonTypeCategory;
   ^~~~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:82:3: note: previous declaration of 'JsonTypeCategory' was here
 } JsonTypeCategory;
   ^~~~~~~~~~~~~~~~
src/parser.c:47:13: error: conflicting types for 'json_categorize_type'
 static void json_categorize_type(Oid typoid, JsonTypeCategory *tcategory, Oid *outfuncoid);
             ^~~~~~~~~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:84:13: note: previous declaration of 'json_categorize_type' was here
 extern void json_categorize_type(Oid typoid, bool is_jsonb,
             ^~~~~~~~~~~~~~~~~~~~
src/parser.c:60:13: error: conflicting types for 'datum_to_json'
 static void datum_to_json(Datum            val,
             ^~~~~~~~~~~~~
In file included from src/parser.c:8:
/usr/pgsql-17/include/server/utils/jsonfuncs.h:86:14: note: previous declaration of 'datum_to_json' was here
 extern Datum datum_to_json(Datum val, JsonTypeCategory tcategory,
              ^~~~~~~~~~~~~
src/parser.c: In function 'get_json_as_hash':
src/parser.c:381:56: warning: passing argument 1 of 'makeJsonLexContextCstringLen' from incompatible pointer type [-Wincompatible-pointer-types]
     JsonLexContext *lex = makeJsonLexContextCstringLen(json, len,
                                                        ^~~~
In file included from src/parser.c:7:
/usr/pgsql-17/include/server/common/jsonapi.h:194:24: note: expected 'JsonLexContext *' {aka 'struct JsonLexContext *'} but argument is of type 'char *'
 extern JsonLexContext *makeJsonLexContextCstringLen(JsonLexContext *lex,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/parser.c:381:62: warning: passing argument 2 of 'makeJsonLexContextCstringLen' makes pointer from integer without a cast [-Wint-conversion]
     JsonLexContext *lex = makeJsonLexContextCstringLen(json, len,
                                                              ^~~
In file included from src/parser.c:7:
/usr/pgsql-17/include/server/common/jsonapi.h:194:24: note: expected 'const char *' but argument is of type 'int'
 extern JsonLexContext *makeJsonLexContextCstringLen(JsonLexContext *lex,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/parser.c:381:27: error: too few arguments to function 'makeJsonLexContextCstringLen'
     JsonLexContext *lex = makeJsonLexContextCstringLen(json, len,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/parser.c:7:
/usr/pgsql-17/include/server/common/jsonapi.h:194:24: note: declared here
 extern JsonLexContext *makeJsonLexContextCstringLen(JsonLexContext *lex,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/parser.c: In function 'hash_object_field_start':
src/parser.c:440:33: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
         _state->save_json_start = _state->lex->token_start;
                                 ^
make: *** [<builtin>: src/parser.o] Error 1
src/kafka_fdw.c:205:9: error: too few arguments to function call, expected 11, have 10
  205 |         kafka_create_foreignscan_path(root,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  206 |                                       baserel,
      |                                       ~~~~~~~~
  207 |                                       NULL, /* default pathtarget */
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  208 |                                       baserel->rows,
      |                                       ~~~~~~~~~~~~~~
  209 |                                       startup_cost,
      |                                       ~~~~~~~~~~~~~
  210 |                                       total_cost,
      |                                       ~~~~~~~~~~~
  211 |                                       NIL,  /* no pathkeys */
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~
  212 |                                       NULL, /* no outer rel either */
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  213 |                                       NULL, /* no extra plan */
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~
  214 |                                       NIL);
      |                                       ~~~~
src/compatibility.h:63:41: note: expanded from macro 'kafka_create_foreignscan_path'
   54 |     (create_foreignscan_path(planner_info,                                                                             \
      |      ~~~~~~~~~~~~~~~~~~~~~~~
   55 |                              reloptinfo,                                                                               \
   56 |                              pathtarget,                                                                               \
   57 |                              rows,                                                                                     \
   58 |                              startup_cost,                                                                             \
   59 |                              total_cost,                                                                               \
   60 |                              pathkeys,                                                                                 \
   61 |                              req_outer,                                                                                \
   62 |                              fdw_outerpath,                                                                            \
   63 |                              fdw_private))
      |                                         ^
/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);
      |                                                                                         ~~~~~~~~~~~~~~~~~
src/kafka_fdw.c:223:13: error: too few arguments to function call, expected 11, have 10
  223 |             kafka_create_foreignscan_path(root,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  224 |                                           baserel,
      |                                           ~~~~~~~~
  225 |                                           NULL, /* default pathtarget */
      |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  226 |                                           baserel->rows,
      |                                           ~~~~~~~~~~~~~~
  227 |                    src/parser.c : 34 : 5 :      error:    redefinition of enumerator 'JSONTYPE_NULL'
          34 s | t a r t uJpS_OcNoTsYtP,E_
N      U| LL                                          ~~~~~~~~~~~~~,
      228/ | *    n u l l ,   s o          w e   d i d n  ' t   b o   t h e r   t o   itdoetnatli_fcyo st*,/

            | |                                           ~~~~~~~~~~~    ^

  229 |   /usr/pgsql-17/include/server/utils/jsonfuncs.h : 70 : 2 :     note:   previous definition is here
       70  |           J S O N T Y P E _ N U L L ,                               / *N InLu,l l ,/ *s noo  pwaet hdkiedyns' t* /bo
t      h| er                                          ~~~~~~~~~~~~~~~~~~~~~~~
to   230i | d e n t i f y     * /
        |           ^
          src/parser.c : 35 : 5 :     error:    redefinition of enumerator 'JSONTYPE_BOOL'
NULL   ,35  | / *   n oJ SoOuNtTeYrP Er_eBlO OeLi,t h e r  /**/ b
o      o| le                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~a
n (bu  i231l | t - i n   t y p e s   o n l y )   * /
        |       ^
    /usr/pgsql-17/include/server/utils/jsonfuncs.h : 71 : 2 :     note: previous definition is here
      N71U | L        LJ,S O/N*T YnPoE _eBxOtOrLa,   p        l        a        n/ ** /bo
o      l| ea                                          ~~~~~~~~~~~~~~~~~~~~~~~~~n
 (bu  i232l | t - i n   t y p e s   o n l y )   * /
        |           ^
    src/parser.c : 36 : 5 :     error:    redefinition of enumerator 'JSONTYPE_NUMERIC' N
IL)   ;36 |
       |                                             ~~~~
JSONTYPsrc/compatibility.hE:_63N:U41M:E RICnote: , expanded from macro 'kafka_create_foreignscan_path'/*
 numeric    54( | d i t t o()c r*e/at
e      _| fo    ^r
eign/usr/pgsql-17/include/server/utils/jsonfuncs.hs:c72a:n2_:pat h(pnote: laprevious definition is herenn
er   _72i | n        fJoS,O N T Y P E _ N U M E R I C ,                           / *   n u m e r i c   ( d i t t o )   * /
        |           ^
    src/parser.c : 37 : 5 :     error:    redefinition of enumerator 'JSONTYPE_DATE'
       37  |          J S O N T\YP
E      _| DAT     ~~~~~~~~~~~~~~~~~~~~~~~E
,       55/ | *   w e   u s e   s p e c i a l   f o r m a t t i n g   f orre ldoaptteitnifmoe,s   * /
        |       ^
    /usr/pgsql-17/include/server/utils/jsonfuncs.h : 73 : 2 :     note:   previous definition is here
      73  |           J S O N T Y P E _ D A T E ,                               / *   w e   u s e   s p e c i a l   f o   r m a t t i n\g
for    d56a |      t e t i m e s   * /
        |           ^
        psrc/parser.ca:t38h:t5a:r geterror: ,  redefinition of enumerator 'JSONTYPE_TIMESTAMP'
      38  |          J S O N T Y P E _      T I M E S T       A M P ,
         |       ^
   /usr/pgsql-17/include/server/utils/jsonfuncs.h : 74 : 2 :       note:   previous definition is here
        74  |           J S O N\TY
   P57E | _ T I M E S T A M P ,
             |           ^
       rsrc/parser.co:w39s:,5 :         error:    redefinition of enumerator 'JSONTYPE_TIMESTAMPTZ'
         39  |          J S     O N T Y P E _ T    I M E S T A M P       T Z ,
                  |       ^
         \/usr/pgsql-17/include/server/utils/jsonfuncs.h
:75   :582 | :     note:   previous definition is here
       75  |            J S O N T Y P E _ T I M E SsTtartuApM_PcToZs,t,
        |           ^
      src/parser.c : 40 : 5 :      error:    redefinition of enumerator 'JSONTYPE_JSON'
      40  |                J S O      N T Y P E _ J  S O N ,             / *   J S O N  \
itse   l59f |     ( a n d   J S O N B )   * /
        |       ^
      t/usr/pgsql-17/include/server/utils/jsonfuncs.ho:t76a:l2_:c ost,note:   previous definition is here
       76  |               J S O N T   Y P E _ J S O N ,                                 / *   J S O N   ( a n d   J S O N B ,   i    f   n o t   i s _ j s o n b )   * / \

|         ^
   60 |   src/parser.c : 41 : 5 :     error:    redefinition of enumerator 'JSONTYPE_ARRAY'
      41   |          J S O NpathkeTyYsP,E _ A R R A Y ,               / *   a r r a y   * /
        |       ^
    /usr/pgsql-17/include/server/utils/jsonfuncs.h : 78 : 2 :     note:   previous definition is here
      78  |           J S O N T Y P E _ A R R A Y ,                              / *   a r\ra
y */
61       | |           ^
     src/parser.c : 42 : 5 :     error:    redefinition of enumerator 'JSONTYPE_COMPOSITE'
       42  |     r e qJ_SoOuNtTeYrP,E _ C O M P O S I T E ,   / *   c o m p o s i t e   * /
        |       ^
     /usr/pgsql-17/include/server/utils/jsonfuncs.h : 79 : 2 :     note:    previous definition is here
       79  |            J S O N T Y P E _ C O M P O S I    \
TE   ,62      |                   / *   c o m p     o s i t e   * /
        |           ^
 fdw_outersrc/parser.cp:a43t:h5,:       error:    redefinition of enumerator 'JSONTYPE_CAST'
            43  |             J S O N T Y P E _ C A S T ,               / *   s o m e t h i n g   w i t h   an   e x p l i c\
   i63t |   c a s t       t o   J S O N   * /
        |         ^
 fdw/usr/pgsql-17/include/server/utils/jsonfuncs.h_:p80riv:a2t:e ))note:
      previous definition is here|
                                        ^
   80 |         JS/usr/pgsql-17/include/server/optimizer/pathnode.hO:N125T:Y21P:E _CAnote: S'create_foreignscan_path' declared here
T,                    125         | /e*x tseormne tFhoirneigg nwPiatthh  a*nc reexaptlei_cfiotr eciagsnts ctaon _JpSaOtNh (*P/la
n      n| er        ^Info *
root, src/parser.cR:e44lO:p5t:I nfoerror:  *relredefinition of enumerator 'JSONTYPE_OTHER',

         | 44 |                     ^                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  126   |                   J        S        O        N        T        Y                P        E        _POaTtHhETRa r g e t   */t*a raglelt ,el
s      | e                                                                                        ~~~~~~~~~~~~~~~~~~~
*/
        127|  |                                                     ^
                                /usr/pgsql-17/include/server/utils/jsonfuncs.hd:o81u:b2l:e  rowsnote: , previous definition is hereCo
st    81s | t        artup_JcSoOsNtT,Y PCEos_tO TtHoEtRa,l _        c        o        s/t*, a
l      |                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~l
 el  s128e |          *                        /
                      |                         ^
List *pathkeys,
      |                                                                                         ~~~~~~~~~~~~~~~
  src/parser.c129: | 45        :        3        :                                 error:                                 Relitypedef redefinition with different types ('enum JsonTypeCategory' vs 'enum JsonTypeCategory')ds
 re   q45uired_ | o}u tJesro,nT
      y| pe                                                                                        ~~~~~~~~~~~~~~~~~~~~~~C
ateg  o130r | y        ;
                      |                           ^
                Pa/usr/pgsql-17/include/server/utils/jsonfuncs.ht:h82 :*3f:d w_onote: utprevious definition is hereerpath
,
82       | | }                                                                                         ~~~~~~~~~~~~~~~~~~~~J
son  T131y | p        e        C        a        t        e        g        o        r        y        ;        Li
s      t|  *  ^f
dw_restrictinfo,src/parser.c:
47      :| 13:                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~
  error: 132 |         static declaration of 'json_categorize_type' follows non-static declaration
                                                           47         | Lsitsatt i*cf dvwo_ipdr ijvsaoten)_;ca
t      e| go                                                                                        ~~~~~~~~~~~~~~~~~r
ize_type(Oid typoid, JsonTypeCategory *tcategory, Oid *outfuncoid);
      |             ^
/usr/pgsql-17/include/server/utils/jsonfuncs.h:84:13: note: previous declaration is here
   84 | extern void json_categorize_type(Oid typoid, bool is_jsonb,
      |             ^
src/parser.c:60:13: error: static declaration of 'datum_to_json' follows non-static declaration
   60 | static void datum_to_json(Datum            val,
      |             ^
/usr/pgsql-17/include/server/utils/jsonfuncs.h:86:14: note: previous declaration is here
   86 | extern Datum datum_to_json(Datum val, JsonTypeCategory tcategory,
      |              ^
src/utils.c:93:9: error: call to undeclared function 'tuplestore_donestoring'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   93 |         tuplestore_donestoring(tupstore);
      |         ^
1 error generated.
make: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: src/utils.bc] Error 1
src/parser.c:383:60: error: too few arguments to function call, expected 5, have 4
  381 |     JsonLexContext *lex = makeJsonLexContextCstringLen(json, len,
      |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  382 |                                                        GetDatabaseEncoding(),
  383 |                                                        true);
      |                                                            ^
/usr/pgsql-17/include/server/common/jsonapi.h:194:24: note: 'makeJsonLexContextCstringLen' declared here
  194 | extern JsonLexContext *makeJsonLexContextCstringLen(JsonLexContext *lex,
      |                        ^                            ~~~~~~~~~~~~~~~~~~~~
  195 |                                                                                                         const char *json,
      |                                                                                                         ~~~~~~~~~~~~~~~~~
  196 |                                                                                                         size_t len,
      |                                                                                                         ~~~~~~~~~~~
  197 |                                                                                                         int encoding,
      |                                                                                                         ~~~~~~~~~~~~~
  198 |                                                                                                         bool need_escapes);
      |                                                                                                         ~~~~~~~~~~~~~~~~~
src/parser.c:440:33: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  440 |         _state->save_json_start = _state->lex->token_start;
      |                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~
src/parser.c:639:1: error: static declaration of 'json_categorize_type' follows non-static declaration
  639 | json_categorize_type(Oid typoid, JsonTypeCategory *tcategory, Oid *outfuncoid)
      | ^
/usr/pgsql-17/include/server/utils/jsonfuncs.h:84:13: note: previous declaration is here
   84 | extern void json_categorize_type(Oid typoid, bool is_jsonb,
      |             ^
src/parser.c:751:70: error: too many arguments to function call, expected 3, have 6
  751 |             datum_to_json(vals[*valcount], nulls[*valcount], result, tcategory, outf2 errorusn generatedcoid.
, false);
      |             ~~~~~~~~~~~~~                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/pgsql-17/include/server/utils/jsonfuncs.h:86:14: note: 'datum_to_json' declared here
   86 | extern Datum datum_to_json(Datum val, JsonTypeCategory tcategory,
      |              ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   87 |                                                    Oid outfuncoid);
      |                                                    ~~~~~~~~~~~~~~
make: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: src/kafka_fdw.bc] Error 1
src/parser.c:799:63: error: too few arguments to function call, expected 4, have 3
  799 |     json_categorize_type(element_type, &tcategory, &outfuncoid);
      |     ~~~~~~~~~~~~~~~~~~~~                                      ^
/usr/pgsql-17/include/server/utils/jsonfuncs.h:84:13: note: 'json_categorize_type' declared here
   84 | extern void json_categorize_type(Oid typoid, bool is_jsonb,
      |             ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |                                                                  JsonTypeCategory *tcategory, Oid *outfuncoid);
      |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/parser.c:819:1: error: static declaration of 'datum_to_json' follows non-static declaration
  819 | datum_to_json(Datum val, bool is_null, StringInfo result, JsonTypeCategory tcategory, Oid outfuncoid, bool key_scalar)
      | ^
/usr/pgsql-17/include/server/utils/jsonfuncs.h:86:14: note: previous declaration is here
   86 | extern Datum datum_to_json(Datum val, JsonTypeCategory tcategory,
      |              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: src/parser.bc] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.03Ti76 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.03Ti76 (%build)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant