Open mattbucci opened 10 months ago
I recommend checking out @ezusoft's implementation here https://wordpress.org/support/topic/missing-function-wpsql_fetch_field/
class pg4fetch_field
{
public $name='empty';
public $type='';
}
function wpsql_fetch_field($result, $num)
{
$objekt=new pg4fetch_field();
$object->name = pg_field_name($result, $num);
$object->type = pg_field_type($result, $num);
return $object;
}
Note: The type conversion is probably not correct, since (mysql/pg)_field_type returns a text and mysql_fetch_field returns a number
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/bf2ef7f4185d5327543ded7df42efb16ff79fa7c/pg4wp/driver_pgsql.php#L871C16-L871C16