[php-src] PR #21384: ext/pgsql, ext/pdo_pgsql: Remove preprocessor guards for symbols predating libpq 10
| From: | KentarouTakeda | Date: | Sun, 08 Mar 2026 02:53:09 +0000 |
| Subject: | [php-src] PR #21384: ext/pgsql, ext/pdo_pgsql: Remove preprocessor guards for symbols predating libpq 10 | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35133@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21384
Author: KentarouTakeda
While working on php/doc-en#5409 to clean up outdated PostgreSQL version notes in the documentation,
I noticed that the source code also retains #ifdef guards for symbols guaranteed to exist in libpq
>= 10.0 (the minimum enforced in build/php.m4 via PQencryptPasswordConn).
Removed guards (all confirmed in PostgreSQL 10 documentation):
-
PG_DIAG_{INTERNAL_POSITION,INTERNAL_QUERY}: libpq 8.0+
- PG_DIAG_{SCHEMA,TABLE,COLUMN,DATATYPE,CONSTRAINT}_NAME: libpq 9.3+
- PG_DIAG_SEVERITY_NONLOCALIZED: libpq 9.6+
- CONNECTION_SSL_STARTUP: libpq 8.0+
- CONNECTION_CONSUME: libpq 10.0+
Refs:
- https://www.postgresql.org/docs/10/libpq-exec.html#LIBPQ-PQRESULTERRORFIELD
- https://www.postgresql.org/docs/10/libpq-connect.html#LIBPQ-PQCONNECTSTARTPARAMS
- https://github.com/php/php-src/blob/53e31d58834ef04375dae7bdc549d73dae371c5a/build/php.m4#L1927