Skip to content

Fix build against PostgreSQL 19 - #383

Merged
pblottiere merged 1 commit into
pgpointcloud:masterfrom
devrimgunduz:master
Aug 4, 2026
Merged

Fix build against PostgreSQL 19#383
pblottiere merged 1 commit into
pgpointcloud:masterfrom
devrimgunduz:master

Conversation

@devrimgunduz

@devrimgunduz devrimgunduz commented Jul 11, 2026

Copy link
Copy Markdown
Contributor
  1. pc_access.c PG19 removed the bits8 typedef (utils/array.h now uses uint8 directly, e.g. ARR_NULLBITMAP() returns uint8*). Replace all uses of bits8 with uint8 (array_get_isnull(), pcpatch_from_point_array(), pcpatch_from_patch_array(), array_to_cstring_array()).

  2. pc_pgsql.c PG19 added an int *fgc_flags output parameter to FuncnameGetCandidates() (8 args instead of 7), used to report why a lookup failed. Add a new #elif PGSQL_VERSION < 190 branch that keeps the existing PG14-PG18 (7-arg) call, and a PG19+ branch that passes a local int fgc_flags to satisfy the new signature. The flags aren't otherwise consumed since this call only wants the OID of a uniquely-named function.

Per pgdg-packaging/pgdg-rpms#213

 1. pc_access.c
    PG19 removed the `bits8` typedef (utils/array.h now uses `uint8`
    directly, e.g. ARR_NULLBITMAP() returns uint8*). Replace all uses
    of `bits8` with `uint8` (array_get_isnull(), pcpatch_from_point_array(),
    pcpatch_from_patch_array(), array_to_cstring_array()).

 2. pc_pgsql.c
    PG19 added an `int *fgc_flags` output parameter to
    FuncnameGetCandidates() (8 args instead of 7), used to report why a
    lookup failed. Add a new `#elif PGSQL_VERSION < 190` branch that
    keeps the existing PG14-PG18 (7-arg) call, and a PG19+ branch that
    passes a local `int fgc_flags` to satisfy the new signature. The
    flags aren't otherwise consumed since this call only wants the OID
    of a uniquely-named function.

@lbartoletti lbartoletti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, is it ok for you @pblottiere ?

@pblottiere

Copy link
Copy Markdown
Member

Thanks a lot for the MR @devrimgunduz 🙏.

I'm going to merge it as is, and I will add CI tests against PG 19 (and PG 18) during the week. Once everything is green, I will make a new release including these changes.

@pblottiere pblottiere added this to the 1.2.6 milestone Aug 4, 2026
@pblottiere
pblottiere merged commit 5b67508 into pgpointcloud:master Aug 4, 2026
12 of 13 checks passed
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

Successfully merging this pull request may close these issues.

3 participants