Skip to content

ext/pgsql: Fix preprocessor guard typos that silently disabled features#21386

Closed
KentarouTakeda wants to merge 1 commit intophp:PHP-8.4from
KentarouTakeda:pgsql-fix-typos-in-preprocessor-guards
Closed

ext/pgsql: Fix preprocessor guard typos that silently disabled features#21386
KentarouTakeda wants to merge 1 commit intophp:PHP-8.4from
KentarouTakeda:pgsql-fix-typos-in-preprocessor-guards

Conversation

@KentarouTakeda
Copy link
Contributor

@KentarouTakeda KentarouTakeda commented Mar 8, 2026

  1. Remove dead VE_PG_LO64 guards from pg_lo_tell()/pg_lo_truncate().
    Bump minimum libpq version to 10.0 #14628 removed HAVE_PG_LO64 from the build system and the corresponding guard in pg_lo_seek(), but missed these two functions. The leftover guards reference undefined VE_PG_LO64 (a misspelling of the removed HAVE_PG_LO64), making the lo_tell64()/lo_truncate64() code paths permanently dead.
  2. Fix PQTRACE_SUPPRESS_TIMESTAMPS guard misspelling in pgsql.stub.php.
    The guard has been misspelled as PQTRACE_SUPPPRESS_TIMESTAMPS (three P's) since 7ec8ae1, preventing the PGSQL_TRACE_SUPPRESS_TIMESTAMPS constant from being registered.

@devnexen
Copy link
Member

devnexen commented Mar 8, 2026

seems you need to regenerate pgsql_arginfo.h

@KentarouTakeda KentarouTakeda changed the base branch from master to PHP-8.4 March 8, 2026 14:39
@KentarouTakeda
Copy link
Contributor Author

Thanks for the review! Actually, this branch is already based on PHP-8.4 — I mistakenly opened the PR against master. These constants were added in PHP 8.3 and documented in the manual, but the preprocessor guard typos have prevented them from actually being available. Since PHP 8.3 is already in the "security fixes only" phase, PHP-8.4 is the correct target. I've changed the base branch to PHP-8.4, which should resolve the conflict and the arginfo issue. Does that sound reasonable?

@devnexen
Copy link
Member

devnexen commented Mar 8, 2026

only the typo would qualify as fix.

Fix `PQTRACE_SUPPRESS_TIMESTAMPS` guard misspelling in pgsql.stub.php.

The guard has been misspelled as `PQTRACE_SUPPPRESS_TIMESTAMPS`
(three P's) since 7ec8ae1, preventing the
`PGSQL_TRACE_SUPPRESS_TIMESTAMPS` constant from being registered.
@KentarouTakeda KentarouTakeda force-pushed the pgsql-fix-typos-in-preprocessor-guards branch from c766785 to 8bc6e56 Compare March 8, 2026 23:28
@KentarouTakeda
Copy link
Contributor Author

Thanks for the feedback! I've updated the PR to only include the PQTRACE_SUPPRESS_TIMESTAMPS typo fix in pgsql.stub.php, dropping the VE_PG_LO64 guard removal from pgsql.c.

@devnexen devnexen closed this in 35d98cb Mar 9, 2026
@devnexen
Copy link
Member

devnexen commented Mar 9, 2026

Thanks !

@KentarouTakeda KentarouTakeda deleted the pgsql-fix-typos-in-preprocessor-guards branch March 9, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants