* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: BaseDB.php,v 1.51 2004/07/13 09:00:40 chriskl Exp $
+ * $Id: BaseDB.php,v 1.52 2004/07/14 18:32:02 soranzo Exp $
*/
include_once('./classes/database/ADODB_base.php');
function hasOperators() { return false; }
function hasTypes() { return false; }
function hasAggregates() { return false; }
- function hasRules() { return false; }
function hasLanguages() { return false; }
function hasSchemas() { return false; }
function hasConversions() { return false; }
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.235 2004/07/13 16:33:37 jollytoad Exp $
+ * $Id: Postgres.php,v 1.236 2004/07/14 18:32:02 soranzo Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
}
// Rules
- if ($this->hasRules()) {
- $rules = &$this->getRules($table);
- if (!is_object($rules)) {
- $this->rollbackTransaction();
- return null;
- }
+ $rules = &$this->getRules($table);
+ if (!is_object($rules)) {
+ $this->rollbackTransaction();
+ return null;
+ }
- if ($rules->recordCount() > 0) {
- $sql .= "\n-- Rules\n\n";
- while (!$rules->EOF) {
- $sql .= $rules->f['definition'] . "\n";
+ if ($rules->recordCount() > 0) {
+ $sql .= "\n-- Rules\n\n";
+ while (!$rules->EOF) {
+ $sql .= $rules->f['definition'] . "\n";
- $rules->moveNext();
- }
+ $rules->moveNext();
}
}
$this->clean($comment);
$status = $this->setComment('FUNCTION', "\"{$newname}\"({$args})", null, $comment);
if ($status != 0) {
- $this->rollbackTransaction();
- return -4;
+ $this->rollbackTransaction();
+ return -4;
}
$status = $this->endTransaction();
function hasTypes() { return true; }
function hasAggregates() { return true; }
function hasIndicies() { return true; }
- function hasRules() { return true; }
function hasLanguages() { return true; }
function hasSRFs() { return true; }
function hasOpClasses() { return true; }
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres72.php,v 1.72 2004/07/07 03:00:07 chriskl Exp $
+ * $Id: Postgres72.php,v 1.73 2004/07/14 18:32:02 soranzo Exp $
*/
$this->clean($comment);
$status = $this->setComment('FUNCTION', "\"{$funcname}\"({$args})", null, $comment);
if ($status != 0) {
- $this->rollbackTransaction();
- return -2;
+ $this->rollbackTransaction();
+ return -2;
}
// Rename the function, if necessary
$sql = "ALTER FUNCTION \"{$funcname}\"({$args}) RENAME TO \"{$newname}\"";
$status = $this->execute($sql);
if ($status != 0) {
- $this->rollbackTransaction();
- return -3;
+ $this->rollbackTransaction();
+ return -3;
}
}