| | |
| | | // | Author: Paul Cooper <pgc@ucecom.com> | |
| | | // +----------------------------------------------------------------------+ |
| | | // |
| | | // $Id: pgsql.php 292715 2009-12-28 14:06:34Z quipo $ |
| | | // $Id: pgsql.php 295587 2010-02-28 17:16:38Z quipo $ |
| | | |
| | | require_once 'MDB2/Driver/Manager/Common.php'; |
| | | |
| | |
| | | */ |
| | | function createDatabase($name, $options = array()) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function alterDatabase($name, $options = array()) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function dropDatabase($name) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function truncateTable($name) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function vacuum($table = null, $options = array()) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function alterTable($name, $changes, $check) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listDatabases() |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listUsers() |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listViews() |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listTableViews($table) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listFunctions() |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listTableTriggers($table = null) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listTables() |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listTableFields($table) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listTableIndexes($table) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function dropConstraint($table, $name, $primary = false) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listTableConstraints($table) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function createSequence($seq_name, $start = 1) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function dropSequence($seq_name) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function listSequences() |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |