Skip to content

ext/pgsql: Removed pg_service(), unavailable with any released libpq - #23857

Open
KentarouTakeda wants to merge 1 commit into
php:PHP-8.5from
KentarouTakeda:pgsql-remove-pg-service
Open

KentarouTakeda wants to merge 1 commit into
php:PHP-8.5from
KentarouTakeda:pgsql-remove-pg-service

Conversation

@KentarouTakeda

Copy link
Copy Markdown
Contributor

PQservice() never shipped in a released libpq; it was dropped during the PostgreSQL 18 beta.

See also php/doc-en#5873

@devnexen

devnexen commented Sep 23, 2026

Copy link
Copy Markdown
Member

Hi @KentarouTakeda good thinking ; what I would do however if I were you is to "reimplement" on master using the information from the connection itself instead wdyt ?

@KentarouTakeda

Copy link
Copy Markdown
Contributor Author

@devnexen
On master, I'd probably add pg_conninfo() instead. pg_service() would use PQconninfo() anyway, and would need a libpq version check since the service is only reported from libpq 18. Exposing PQconninfo() directly avoids that and gives more than just the service name. It's also a thin libpq wrapper, like much of ext/pgsql.

Still, restoring the function from 8.5 makes sense too, and it avoids dealing with the password.

@devnexen

Copy link
Copy Markdown
Member

@adoy @DanielEScherzer @edorian what do you think if we remove this for the next 8.5 release ?

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