Postgres::alterTableSchema PHP Method

alterTableSchema() public method

Alter a table's schema !\ this function is called from _alterTable which take care of escaping fields
public alterTableSchema ( $tblrs, $schema = null )
$tblrs The table RecordSet returned by getTable()
    function alterTableSchema($tblrs, $schema = null)
    {
        /* vars cleaned in _alterTable */
        if (!empty($schema) && $tblrs->fields['nspname'] != $schema) {
            $f_schema = $this->_schema;
            $this->fieldClean($f_schema);
            // If tablespace has been changed, then do the alteration.  We
            // don't want to do this unnecessarily.
            $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" SET SCHEMA \"{$schema}\"";
            return $this->execute($sql);
        }
        return 0;
    }
Postgres