Postgres::getTable PHP Method

getTable() public method

Returns table information
public getTable ( $table ) : A
$table The name of the table
return A recordset
    function getTable($table)
    {
        $c_schema = $this->_schema;
        $this->clean($c_schema);
        $this->clean($table);
        $sql = "\n\t\t\tSELECT\n\t\t\t  c.relname, n.nspname, u.usename AS relowner,\n\t\t\t  pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment,\n\t\t\t  (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=c.reltablespace) AS tablespace\n\t\t\tFROM pg_catalog.pg_class c\n\t\t\t     LEFT JOIN pg_catalog.pg_user u ON u.usesysid = c.relowner\n\t\t\t     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n\t\t\tWHERE c.relkind = 'r'\n\t\t\t      AND n.nspname = '{$c_schema}'\n\t\t\t      AND n.oid = c.relnamespace\n\t\t\t      AND c.relname = '{$table}'";
        return $this->selectSet($sql);
    }
Postgres