Skip to content

Commit ae5df91

Browse files
committed
regenerated the files
1 parent 0c573cd commit ae5df91

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

generated/functionsList.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@
721721
'pg_field_table',
722722
'pg_flush',
723723
'pg_free_result',
724+
'pg_host',
724725
'pg_insert',
725726
'pg_last_oid',
726727
'pg_lo_close',

generated/pgsql.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,35 @@ function pg_free_result($result): void
384384
}
385385

386386

387+
/**
388+
* pg_host returns the host name of the given
389+
* PostgreSQL connection instance is
390+
* connected to.
391+
*
392+
* @param resource $connection An PgSql\Connection instance.
393+
* When connection is NULL, the default connection is used.
394+
* The default connection is the last connection made by pg_connect
395+
* or pg_pconnect.
396+
* @return string A string containing the name of the host the
397+
* connection is to.
398+
* @throws PgsqlException
399+
*
400+
*/
401+
function pg_host($connection = null): string
402+
{
403+
error_clear_last();
404+
if ($connection !== null) {
405+
$result = \pg_host($connection);
406+
} else {
407+
$result = \pg_host();
408+
}
409+
if ($result === '') {
410+
throw PgsqlException::createFromPhpError();
411+
}
412+
return $result;
413+
}
414+
415+
387416
/**
388417
* pg_insert inserts the values
389418
* of values into the table specified

rector-migrate.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@
731731
'pg_field_table' => 'Safe\pg_field_table',
732732
'pg_flush' => 'Safe\pg_flush',
733733
'pg_free_result' => 'Safe\pg_free_result',
734+
'pg_host' => 'Safe\pg_host',
734735
'pg_insert' => 'Safe\pg_insert',
735736
'pg_last_oid' => 'Safe\pg_last_oid',
736737
'pg_lo_close' => 'Safe\pg_lo_close',

0 commit comments

Comments
 (0)