/**
* Returns the error code from the last connection attempt.
*
* This function is a wrapper for the pg_connect_errno function. It returns the error code from
* the last call to pg_connect() or pg_real_connect(). It is useful for error handling after
* attempting to establish a connection to a PostgreSQL server, allowing the script to respond appropriately
* to specific error conditions. The function does not take any parameters and returns an integer error
* code. If no error occurred during the last connection attempt, it will return zero.
*
* @return int The error code from the last connection attempt.
*/
function wpsqli_connect_errno()
{
throw new \Exception("PG4WP: Not Yet Implemented");
}
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/bf2ef7f4185d5327543ded7df42efb16ff79fa7c/pg4wp/driver_pgsql.php#L342