Title: Missing function wpsql_fetch_field
Last modified: October 26, 2021

---

# Missing function wpsql_fetch_field

 *  [ezusoft](https://wordpress.org/support/users/ezusoft/)
 * (@ezusoft)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/missing-function-wpsql_fetch_field/)
 * The function wpsql_fetch_field was not implemented in driver_pgsql.php:
 *     ```
       	function wpsql_fetch_field($result)
       		{ return 'tablename'; }
       ```
   
 * This is required, among other things, for the plug-in “wp-db-table-editor”
 * The following Q&D adjustment works for me:
 *     ```
       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
    -  This topic was modified 4 years, 6 months ago by [ezusoft](https://wordpress.org/support/users/ezusoft/).
    -  This topic was modified 4 years, 6 months ago by [ezusoft](https://wordpress.org/support/users/ezusoft/).

The topic ‘Missing function wpsql_fetch_field’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/postgresql-for-wordpress.svg)
 * [PostgreSQL for WordPress (PG4WP)](https://wordpress.org/plugins/postgresql-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/postgresql-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/postgresql-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/postgresql-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/postgresql-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/postgresql-for-wordpress/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ezusoft](https://wordpress.org/support/users/ezusoft/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/missing-function-wpsql_fetch_field/)
 * Status: not resolved