PostgreSQL-For-Wordpress / postgresql-for-wordpress

A maintained fork of https://wordpress.org/plugins/postgresql-for-wordpress/
GNU General Public License v2.0
220 stars 71 forks source link

implement wpsqli_host_info #58

Open mattbucci opened 10 months ago

mattbucci commented 10 months ago

https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/bf2ef7f4185d5327543ded7df42efb16ff79fa7c/pg4wp/driver_pgsql.php#L235C1-L250C2

/**
 * Returns a string representing the type of connection used.
 *
 * This function is a wrapper for the pg_get_host_info function. It retrieves information about
 * the type of connection that was established to the PostgreSQL server and the host server information.
 * This includes the host name and the connection type, such as TCP/IP or a UNIX socket. It's useful
 * for debugging and for understanding how PHP is communicating with the PostgreSQL server.
 *
 * @param PgSql\Connection $connection The pg connection resource.
 * @return string A string describing the connection type and server host information.
 */
function wpsqli_host_info(&$connection)
{
    throw new \Exception("PG4WP: Not Yet Implemented");
    // mysqli_get_host_info => No direct equivalent. Host information is part of the connection string in PostgreSQL.
}