Fix build against PG16 headers: Value node removal and missing htonl decl#123
Fix build against PG16 headers: Value node removal and missing htonl decl#123chenjinbao1989 wants to merge 6 commits into
Conversation
…decl pxfuriparser.c and pxf_option.c used the generic Value node type for option-name strings; PG16 split Value into distinct Integer/Float/String/ etc. node types, and makeString()/strVal() now operate on String *, so these failed to compile with "unknown type name 'Value'". gpdbwritableformatter.c called htonl/ntohl/htons/ntohs without including arpa/inet.h. This used to be a silent implicit-declaration warning but is a hard error under GCC 13's -Werror=implicit-function-declaration.
|
Compilation with cloudberry 2.x got broken. e.g. in Test PXF - fdw |
|
I see external-table/test/pxfprotocol_test.c file still use |
|
Besides the cloudberry-pxf/.github/workflows/pxf-ci.yml Lines 38 to 44 in 75cf1f6 Then we can verify if the changes work, right? |
|
I think that we can support cloudberry 2.x and 3.x in a single cloudberry-pxf codebase with some |
pxfuriparser.c and pxf_option.c hardcoded the PG16 String node type, which broke compilation against Cloudberry builds still on a pre-16 Postgres base (e.g. the PG14-based cbdb-build-ubuntu22.04 image used by the testcontainers automation suite, which still uses the old generic Value node). Replaced with a PG_VERSION_NUM-gated typedef so the same source compiles against both. build_pxf.sh: the testcontainers harness copies the entire host repo (including any binaries the host already built) into the test container, so a plain `make install` for the native external-table/fdw extensions could silently reuse a .so built for a different Postgres base or glibc instead of rebuilding for the container's own toolchain. Added `clean` before `install`, and `set -euo pipefail` so a real build failure fails loudly instead of being silently swallowed (this is how the resulting "pxf.control missing" error went undetected).
| GO_VERSION: "1.25" | ||
| GPHOME: "/usr/local/cloudberry-db" | ||
| CLOUDBERRY_VERSION: "REL_2_STABLE" | ||
| CLOUDBERRY_VERSION: "main" |
There was a problem hiding this comment.
I think we can create a branch matrix to test both these branches until 2.X is EOL in the future.
pxfuriparser.c and pxf_option.c used the generic Value node type for option-name strings; PG16 split Value into distinct Integer/Float/String/ etc. node types, and makeString()/strVal() now operate on String *, so these failed to compile with "unknown type name 'Value'".
gpdbwritableformatter.c called htonl/ntohl/htons/ntohs without including arpa/inet.h. This used to be a silent implicit-declaration warning but is a hard error under GCC 13's -Werror=implicit-function-declaration.
closes: #ISSUE_Number
Change logs
Contributor's checklist
Here are some reminders before you submit your pull request: