function createTablespace($spcname, $spcowner, $spcloc, $comment = '')
{
$this->fieldClean($spcname);
$this->clean($spcloc);
$sql = "CREATE TABLESPACE \"{$spcname}\"";
if ($spcowner != '') {
$this->fieldClean($spcowner);
$sql .= " OWNER \"{$spcowner}\"";
}
$sql .= " LOCATION '{$spcloc}'";
$status = $this->execute($sql);
if ($status != 0) {
return -1;
}
if ($comment != '' && $this->hasSharedComments()) {
$status = $this->setComment('TABLESPACE', $spcname, '', $comment);
if ($status != 0) {
return -2;
}
}
return 0;
}