Postgres::getTablespaces PHP Method

getTablespaces() public method

Retrieves information for all tablespaces
public getTablespaces ( $all = false ) : A
$all Include all tablespaces (necessary when moving objects back to the default space)
return A recordset
    function getTablespaces($all = false)
    {
        global $conf;
        $sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, pg_catalog.pg_tablespace_location(oid) as spclocation,\n                    (SELECT description FROM pg_catalog.pg_shdescription pd WHERE pg_tablespace.oid=pd.objoid AND pd.classoid='pg_tablespace'::regclass) AS spccomment\n\t\t\t\t\tFROM pg_catalog.pg_tablespace";
        if (!$conf['show_system'] && !$all) {
            $sql .= ' WHERE spcname NOT LIKE $$pg\\_%$$';
        }
        $sql .= " ORDER BY spcname";
        return $this->selectSet($sql);
    }
Postgres