All functions from the PostgreSQL extension that previously returned a resource object now return a class object, and their counterpart functions also accept the same class objects.
Note that the is_resource function no longer returns true for the new class objects, and it may now be necessary to change the is_resource check with a comparison to false, or account for the new class instances as well.
wp-db.php is updated to class-wpdb.php
All constants definitions now check if already defined so they can be set via wp-config.php instead of db.php
This PR attempts to address issues with PHP 8 and WP 6+ compatibility
All functions from the PostgreSQL extension that previously returned a resource object now return a class object, and their counterpart functions also accept the same class objects.
Note that the is_resource function no longer returns true for the new class objects, and it may now be necessary to change the is_resource check with a comparison to false, or account for the new class instances as well.
wp-db.php is updated to class-wpdb.php
All constants definitions now check if already defined so they can be set via wp-config.php instead of db.php