Skip to content

Commit 43c6014

Browse files
KentarouTakedadevnexen
authored andcommitted
ext/pgsql: Removed pg_service(), unavailable with any released libpq
`PQservice()` never shipped in a released libpq; it was dropped during the PostgreSQL 18 beta. Close GH-23857
1 parent 282be4e commit 43c6014

7 files changed

Lines changed: 2 additions & 53 deletions

File tree

‎NEWS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ PHP NEWS
6868

6969
- PGSQL:
7070
. Fixed pg_lo_write() rejecting data containing null bytes. (Ilia Alshanetsky)
71+
. Removed pg_service(), unavailable with any released libpq. (KentarouTakeda)
7172

7273
- Readline:
7374
. Fixed a heap over-read in the interactive shell prompt when cli.prompt is

‎UPGRADING‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,6 @@ PHP 8.5 UPGRADE NOTES
782782
. pg_close_stmt offers an alternative way to close a prepared
783783
statement from the DEALLOCATE sql command in that we can reuse
784784
its name afterwards.
785-
. pg_service returns the ongoing service name of the connection.
786785

787786
- Reflection:
788787
. ReflectionConstant::getFileName() was introduced.

‎ext/pgsql/config.m4‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ if test "$PHP_PGSQL" != "no"; then
3131
PHP_CHECK_LIBRARY([pq], [PQclosePrepared],
3232
[AC_DEFINE([HAVE_PG_CLOSE_STMT], [1], [PostgreSQL 17 or later])],,
3333
[$PGSQL_LIBS])
34-
PHP_CHECK_LIBRARY([pq], [PQservice],
35-
[AC_DEFINE([HAVE_PG_SERVICE], [1], [PostgreSQL 18 or later])],,
36-
[$PGSQL_LIBS])
3734

3835
old_CFLAGS=$CFLAGS
3936
CFLAGS="$CFLAGS $PGSQL_CFLAGS"

‎ext/pgsql/pgsql.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,6 @@ PHP_FUNCTION(pg_close)
922922
#define PHP_PG_HOST 6
923923
#define PHP_PG_VERSION 7
924924
#define PHP_PG_JIT 8
925-
#define PHP_PG_SERVICE 9
926925

927926
/* php_pgsql_get_link_info */
928927
static void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
@@ -1007,12 +1006,6 @@ static void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type
10071006
PQclear(res);
10081007
return;
10091008
}
1010-
#if defined(HAVE_PG_SERVICE)
1011-
case PHP_PG_SERVICE: {
1012-
result = PQservice(pgsql);
1013-
break;
1014-
}
1015-
#endif
10161009
EMPTY_SWITCH_DEFAULT_CASE()
10171010
}
10181011
if (result) {
@@ -1069,13 +1062,6 @@ PHP_FUNCTION(pg_jit)
10691062
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_JIT);
10701063
}
10711064

1072-
#if defined(HAVE_PG_SERVICE)
1073-
PHP_FUNCTION(pg_service)
1074-
{
1075-
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_SERVICE);
1076-
}
1077-
#endif
1078-
10791065
/* Returns the value of a server parameter */
10801066
PHP_FUNCTION(pg_parameter_status)
10811067
{

‎ext/pgsql/pgsql.stub.php‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,6 @@ function pg_version(?PgSql\Connection $connection = null): array {}
508508
*/
509509
function pg_jit(?PgSql\Connection $connection = null): array {}
510510

511-
#ifdef HAVE_PG_SERVICE
512-
function pg_service(?PgSql\Connection $connection = null): string {}
513-
#endif
514511
/**
515512
* @param PgSql\Connection|string $connection
516513
* @refcount 1

‎ext/pgsql/pgsql_arginfo.h‎

Lines changed: 1 addition & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ext/pgsql/tests/pg_service.phpt‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)