/**
* Returns the thread ID for the current connection.
*
* This function is a wrapper for the pg_thread_id function. It retrieves the thread ID used by
* the current connection to the PostgreSQL server. This ID can be used as an argument to the KILL
* statement to terminate a connection. It is useful for debugging and managing PostgreSQL connections
* and can be used to uniquely identify the connection within the server's process.
*
* @param PgSql\Connection $connection The pg connection resource.
* @return int The thread ID for the current connection.
*/
function wpsqli_thread_id(&$connection)
{
throw new \Exception("PG4WP: Not Yet Implemented");
// mysqli_thread_id => No direct equivalent. PostgreSQL does not provide thread ID in the same manner as MySQL.
}
/**
* Returns whether the client library is thread-safe.
*
* This function is a wrapper for the pg_thread_safe function. It indicates whether the
* pg client library that PHP is using is thread-safe. This is important information when
* running PHP in a multi-threaded environment such as with the worker MPM in Apache or when
* using multi-threading extensions in PHP.
*
* @return bool Returns TRUE if the client library is thread-safe, FALSE otherwise.
*/
function wpsqli_thread_safe()
{
throw new \Exception("PG4WP: Not Yet Implemented");
// mysqli_thread_safe => No direct equivalent. PostgreSQL's thread safety is dependent on PHP's thread safety.
}
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/bf2ef7f4185d5327543ded7df42efb16ff79fa7c/pg4wp/driver_pgsql.php#L271C1-L286C2
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/bf2ef7f4185d5327543ded7df42efb16ff79fa7c/pg4wp/driver_pgsql.php#L288C1-L302C2