/**
* Frees the memory associated with a result.
*
* This function is a wrapper for the pg_free_result function. It's used to free the memory
* allocated for a result set obtained from a query. When the result data is not needed anymore,
* it's a good practice to free the associated resources, especially when dealing with large
* datasets that can consume significant amounts of memory. It is an important aspect of resource
* management and helps to keep the application's memory footprint minimal.
*
* @param \PgSql\Result $result The result set returned by pg_query, pg_store_result
* or pg_use_result.
* @return void This function doesn't return any value.
*/
function wpsqli_free_result($result)
{
// mysqli_free_result => pg_free_result (resource $result): bool
// Frees memory associated with a result.
return pg_free_result($result);
}
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/bf2ef7f4185d5327543ded7df42efb16ff79fa7c/pg4wp/driver_pgsql.php#L970