Postgres::alterTableOwner PHP Method

alterTableOwner() public method

Alter a table's owner !\ this function is called from _alterTable which take care of escaping fields
public alterTableOwner ( $tblrs, $owner = null )
$tblrs The table RecordSet returned by getTable()
    function alterTableOwner($tblrs, $owner = null)
    {
        /* vars cleaned in _alterTable */
        if (!empty($owner) && $tblrs->fields['relowner'] != $owner) {
            $f_schema = $this->_schema;
            $this->fieldClean($f_schema);
            // If owner has been changed, then do the alteration.  We are
            // careful to avoid this generally as changing owner is a
            // superuser only function.
            $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" OWNER TO \"{$owner}\"";
            return $this->execute($sql);
        }
        return 0;
    }
Postgres