Postgres::_alterTable PHP Метод

_alterTable() защищенный Метод

Protected method which alter a table SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION
protected _alterTable ( $tblrs, $name, $owner, $schema, $comment, $tablespace ) : -7
$tblrs The table recordSet returned by getTable()
$name The new name for the table
$owner The new owner for the table
$schema The new schema for the table
$comment The comment on the table
$tablespace The new tablespace for the table ('' means leave as is)
Результат -7
    protected function _alterTable($tblrs, $name, $owner, $schema, $comment, $tablespace)
    {
        $this->fieldArrayClean($tblrs->fields);
        // Comment
        $status = $this->setComment('TABLE', '', $tblrs->fields['relname'], $comment);
        if ($status != 0) {
            return -4;
        }
        // Owner
        $this->fieldClean($owner);
        $status = $this->alterTableOwner($tblrs, $owner);
        if ($status != 0) {
            return -5;
        }
        // Tablespace
        $this->fieldClean($tablespace);
        $status = $this->alterTableTablespace($tblrs, $tablespace);
        if ($status != 0) {
            return -6;
        }
        // Rename
        $this->fieldClean($name);
        $status = $this->alterTableName($tblrs, $name);
        if ($status != 0) {
            return -3;
        }
        // Schema
        $this->fieldClean($schema);
        $status = $this->alterTableSchema($tblrs, $schema);
        if ($status != 0) {
            return -7;
        }
        return 0;
    }
Postgres