Postgres::getTableAutovacuum PHP Метод

getTableAutovacuum() публичный Метод

Returns all available autovacuum per table information.
public getTableAutovacuum ( $table = '' ) : A
$table if given, return autovacuum info for the given table or return all informations for all table
Результат A recordset
    function getTableAutovacuum($table = '')
    {
        $sql = '';
        if ($table !== '') {
            $this->clean($table);
            $c_schema = $this->_schema;
            $this->clean($c_schema);
            $sql = "SELECT c.oid, nspname, relname, pg_catalog.array_to_string(reloptions, E',') AS reloptions\n\t\t\t\tFROM pg_class c\n\t\t\t\t\tLEFT JOIN pg_namespace n ON n.oid = c.relnamespace\n\t\t\t\tWHERE c.relkind = 'r'::\"char\"\n\t\t\t\t\tAND n.nspname NOT IN ('pg_catalog','information_schema')\n\t\t\t\t\tAND c.reloptions IS NOT NULL\n\t\t\t\t\tAND c.relname = '{$table}' AND n.nspname = '{$c_schema}'\n\t\t\t\tORDER BY nspname, relname";
        } else {
            $sql = "SELECT c.oid, nspname, relname, pg_catalog.array_to_string(reloptions, E',') AS reloptions\n\t\t\t\tFROM pg_class c\n\t\t\t\t\tLEFT JOIN pg_namespace n ON n.oid = c.relnamespace\n\t\t\t\tWHERE c.relkind = 'r'::\"char\"\n\t\t\t\t\tAND n.nspname NOT IN ('pg_catalog','information_schema')\n\t\t\t\t\tAND c.reloptions IS NOT NULL\n\t\t\t\tORDER BY nspname, relname";
        }
        /* tmp var to parse the results */
        $_autovacs = $this->selectSet($sql);
        /* result aray to return as RS */
        $autovacs = array();
        while (!$_autovacs->EOF) {
            $_ = array('nspname' => $_autovacs->fields['nspname'], 'relname' => $_autovacs->fields['relname']);
            foreach (explode(',', $_autovacs->fields['reloptions']) as $var) {
                list($o, $v) = explode('=', $var);
                $_[$o] = $v;
            }
            $autovacs[] = $_;
            $_autovacs->moveNext();
        }
        include_once './classes/ArrayRecordSet.php';
        return new ArrayRecordSet($autovacs);
    }
Postgres