From ae5df91f5de66c7ad85666c4b14af129b19a1033 Mon Sep 17 00:00:00 2001 From: kharhamel Date: Sat, 16 Oct 2021 19:03:59 +0200 Subject: [PATCH] regenerated the files --- generated/functionsList.php | 1 + generated/pgsql.php | 29 +++++++++++++++++++++++++++++ rector-migrate.php | 1 + 3 files changed, 31 insertions(+) diff --git a/generated/functionsList.php b/generated/functionsList.php index 18bc42e7..3747e19b 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -721,6 +721,7 @@ 'pg_field_table', 'pg_flush', 'pg_free_result', + 'pg_host', 'pg_insert', 'pg_last_oid', 'pg_lo_close', diff --git a/generated/pgsql.php b/generated/pgsql.php index f84d2a64..ee24da57 100644 --- a/generated/pgsql.php +++ b/generated/pgsql.php @@ -384,6 +384,35 @@ function pg_free_result($result): void } +/** + * pg_host returns the host name of the given + * PostgreSQL connection instance is + * connected to. + * + * @param resource $connection An PgSql\Connection instance. + * When connection is NULL, the default connection is used. + * The default connection is the last connection made by pg_connect + * or pg_pconnect. + * @return string A string containing the name of the host the + * connection is to. + * @throws PgsqlException + * + */ +function pg_host($connection = null): string +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_host($connection); + } else { + $result = \pg_host(); + } + if ($result === '') { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + /** * pg_insert inserts the values * of values into the table specified diff --git a/rector-migrate.php b/rector-migrate.php index adb15ac6..f075867e 100644 --- a/rector-migrate.php +++ b/rector-migrate.php @@ -731,6 +731,7 @@ 'pg_field_table' => 'Safe\pg_field_table', 'pg_flush' => 'Safe\pg_flush', 'pg_free_result' => 'Safe\pg_free_result', + 'pg_host' => 'Safe\pg_host', 'pg_insert' => 'Safe\pg_insert', 'pg_last_oid' => 'Safe\pg_last_oid', 'pg_lo_close' => 'Safe\pg_lo_close',