1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
KentarouTakeda c56e8caaed ext/pgsql, ext/pdo_pgsql: Remove preprocessor guards for symbols predating libpq 10 (#21384)
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
- 53e31d5883/build/php.m4 (L1927)
2026-03-08 05:42:50 +00:00
..
2025-11-04 00:08:42 +00:00
2023-11-06 22:36:52 +00:00
2023-11-06 22:36:52 +00:00
2023-11-28 02:00:47 +03:00
2024-02-08 22:44:03 +00:00
2024-12-15 16:05:10 +00:00
2024-06-14 16:27:00 +01:00
2002-04-05 06:05:28 +00:00
2022-05-12 14:55:11 +02:00

The pgsql extension tests

Test scripts assumes:

  • PostgreSQL server is installed locally
  • There is a PostgreSQL account for the users running the test scripts
  • There is database named test

For instance, if your login name is testuser, you should have PostgreSQL user account named testuser and grant that user access to the database test.

If you have account and database, type createdb test from command prompt to create the database to execute the test scripts. By executing the above command as the same user running the tests you ensure that the user is granted access to the database.

If you find problems in PostgreSQL extension, please report a bug.