pgspider / jdbc_fdw

JDBC Foreign Data Wrapper for PostgreSQL
Other
58 stars 20 forks source link

Compile errors when using PostgreSQL V15 source code #26

Open HankCalzaretta opened 9 months ago

HankCalzaretta commented 9 months ago

I can successfully build 'jdbc-fdw` against Postgres V14.9 source code, however when I attempt to build it against V15 source code I get several compile-time errors.

Any help would be much appreciated, thanks!

These are some of the errors:

jdbc_fdw.c: In function ‘jdbcGetForeignRelSize’: jdbc_fdw.c:594:20: error: ‘RangeTblEntry’ {aka ‘struct RangeTblEntry’} has no member named ‘checkAsUser’ 594 | Oid userid = rte->checkAsUser ? rte->checkAsUser : GetUserId(); | ^~ jdbc_fdw.c:594:39: error: ‘RangeTblEntry’ {aka ‘struct RangeTblEntry’} has no member named ‘checkAsUser’ 594 | Oid userid = rte->checkAsUser ? rte->checkAsUser : GetUserId(); | ^~ jdbc_fdw.c: In function ‘jdbcGetForeignPaths’: jdbc_fdw.c:771:5: error: too few arguments to function ‘create_foreignscan_path’ 771 | create_foreignscan_path(root, baserel, | ^~~~~~~

JulmeTran commented 5 months ago

We fixed this issue for PostgreSQL 16.0 on release https://github.com/pgspider/jdbc_fdw/releases/tag/v0.4.0. Could you try again to check with this source code?

Bartman0 commented 5 months ago

I was succesfull in compiling against 15.5.

I am on debian-12, with gcc 12.2.0

JosefMachytkaNetApp commented 2 months ago

@Bartman0 Could you please share which version of Java you used for build? I am getting deprecated API error - as shown in https://github.com/pgspider/jdbc_fdw/issues/35 when trying to build on Debian 12, default JDK 17 - the same for both PG 15 and 16. Thank you.

Bartman0 commented 2 months ago

I have:

$ apt info openjdk-17-jdk-headless
Package: openjdk-17-jdk-headless
Version: 17.0.10+7-1~deb12u1
Priority: optional
Section: java
Source: openjdk-17
Maintainer: OpenJDK Team <openjdk-17@packages.debian.org>
Installed-Size: 78.5 MB
Provides: java-compiler, java-sdk-headless (= 17), java10-sdk-headless, java11-sdk-headless, java12-sdk-headless, java13-sdk-headless, java14-sdk-headless, java15-sdk-headless, java16-sdk-headless, java17-sdk-headless, java2-sdk-headless, java5-sdk-headless, java6-sdk-headless, java7-sdk-headless, java8-sdk-headless, java9-sdk-headless
Depends: openjdk-17-jre-headless (= 17.0.10+7-1~deb12u1), libc6 (>= 2.34), zlib1g (>= 1:1.1.4)
Suggests: openjdk-17-demo, openjdk-17-source
Breaks: openjdk-17-jre-headless (<< 17~10)
Replaces: openjdk-17-jre-headless (<< 17~10)
Homepage: https://openjdk.java.net/
Download-Size: 71.3 MB
APT-Manual-Installed: no
APT-Sources: mirror+file:/etc/apt/mirrors/debian.list bookworm/main amd64 Packages
Description: OpenJDK Development Kit (JDK) (headless)
 OpenJDK is a development environment for building applications,
 applets, and components using the Java programming language.
JosefMachytkaNetApp commented 2 months ago

Thanky you @Bartman0 I have the same version on both VMS with Debian 12, but build does not work - getting Note: JDBCConnection.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. for both PG 15 and 16

JosefMachytkaNetApp commented 2 months ago

So build fails when I use release file https://github.com/pgspider/jdbc_fdw/archive/refs/tags/v0.4.0.zip but build from the main branch of repository works.