/**
* Class to hold various commonly used functions
*
- * $Id: Misc.php,v 1.108 2005/07/31 08:40:26 chriskl Exp $
+ * $Id: Misc.php,v 1.109 2005/07/31 09:15:06 chriskl Exp $
*/
class Misc {
/**
* Creates a database accessor
*/
- function &getDatabaseAccessor($database, $server_id = null) {
+ function getDatabaseAccessor($database, $server_id = null) {
global $lang, $conf, $misc;
$server_info = $this->getServerInfo($server_id);
}
}
- function &adjustTabsForTree(&$tabs) {
+ function adjustTabsForTree(&$tabs) {
include_once('classes/ArrayRecordSet.php');
foreach ($tabs as $i => $tab) {
* @param $recordset return as RecordSet suitable for printTable if true,
* otherwise just return an array.
*/
- function &getServers($recordset = false) {
+ function getServers($recordset = false) {
global $conf;
$srvs = isset($_SESSION['webdbLogin']) && is_array($_SESSION['webdbLogin']) ? $_SESSION['webdbLogin'] : array();
* the functions provided by the database driver exclusively, and hence
* will work with any database without modification.
*
- * $Id: Reports.php,v 1.12 2005/05/02 15:47:26 chriskl Exp $
+ * $Id: Reports.php,v 1.13 2005/07/31 09:15:06 chriskl Exp $
*/
class Reports {
* Finds all reports
* @return A recordset
*/
- function &getReports() {
+ function getReports() {
global $conf, $misc;
// Filter for owned reports if necessary
if ($conf['owned_reports_only']) {
* @param $report_id The ID of the report to find
* @return A recordset
*/
- function &getReport($report_id) {
+ function getReport($report_id) {
$sql = $this->driver->getSelectSQL('ppa_reports',
array('report_id', 'report_name', 'db_name', 'date_created', 'created_by', 'descr', 'report_sql'),
array('report_id' => $report_id), array('report_id' => '='), array());
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.266 2005/07/26 08:53:00 chriskl Exp $
+ * $Id: Postgres.php,v 1.267 2005/07/31 09:15:06 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
/**
* Initialize help pages and return the full list
*/
- function &getHelpPages() {
+ function getHelpPages() {
include_once('./help/PostgresDoc70.php');
return $this->help_page;
}
* Return all database available on the server
* @return A list of databases, sorted alphabetically
*/
- function &getDatabases($currentdatabase = NULL) {
+ function getDatabases($currentdatabase = NULL) {
global $conf, $misc;
$server_info = $misc->getServerInfo();
* @param string $database the name of the database to get the owner for
* @return recordset of the db owner info
*/
- function &getDatabaseOwner($database) {
+ function getDatabaseOwner($database) {
$this->clean($database);
$sql = "SELECT usename FROM pg_user, pg_database WHERE pg_user.usesysid = pg_database.datdba AND pg_database.datname = '{$database}' ";
return $this->selectSet($sql);
* @param $database The name of the database to retrieve
* @return The database info
*/
- function &getDatabase($database) {
+ function getDatabase($database) {
$this->clean($database);
$sql = "SELECT * FROM pg_database WHERE datname='{$database}'";
return $this->selectSet($sql);
* @param $table The table to find the parents for
* @return A recordset
*/
- function &getTableParents($table) {
+ function getTableParents($table) {
$this->clean($table);
$sql = "
* @param $table The table to find the children for
* @return A recordset
*/
- function &getTableChildren($table) {
+ function getTableChildren($table) {
$this->clean($table);
$sql = "
* @param $table The name of the table
* @return A recordset
*/
- function &getTable($table) {
+ function getTable($table) {
$this->clean($table);
$sql = "SELECT pc.relname,
* @param $all True to fetch all tables, false for just in current schema
* @return All tables, sorted alphabetically
*/
- function &getTables($all = false) {
+ function getTables($all = false) {
global $conf;
if (!$conf['show_system'] || $all) $where = "AND c.relname NOT LIKE 'pg\\\\_%' ";
else $where = '';
* @param $field (optional) The name of a field to return
* @return All attributes in order
*/
- function &getTableAttributes($table, $field = '') {
+ function getTableAttributes($table, $field = '') {
$this->clean($table);
$this->clean($field);
* @return A string containing the formatted SQL code
* @return null On error
*/
- function &getTableDefPrefix($table, $clean = false) {
+ function getTableDefPrefix($table, $clean = false) {
// Fetch table
$t = &$this->getTable($table);
if (!is_object($t) || $t->recordCount() != 1) {
* @return A string containing the formatted SQL code
* @return null On error
*/
- function &getTableDefSuffix($table) {
+ function getTableDefSuffix($table) {
$sql = '';
// Indexes
* @param $key The associative array holding the key to retrieve
* @return A recordset
*/
- function &browseRow($table, $key) {
+ function browseRow($table, $key) {
$this->fieldClean($table);
$sql = "SELECT * FROM \"{$table}\"";
* Returns all sequences in the current database
* @return A recordset
*/
- function &getSequences($all = false) {
+ function getSequences($all = false) {
// $all argument is ignored as it makes no difference
$sql = "SELECT
c.relname AS seqname,
* @param $sequence Sequence name
* @return A recordset
*/
- function &getSequence($sequence) {
+ function getSequence($sequence) {
$temp = $sequence;
// Need both field cleaned and literal cleaned versions
$this->fieldClean($sequence);
* @return 0 success
* @return -1 sequence not found
*/
- function &resetSequence($sequence) {
+ function resetSequence($sequence) {
// Get the minimum value of the sequence
$seq = &$this->getSequence($sequence);
if ($seq->recordCount() != 1) return -1;
* @param $table The table to find rules for
* @return A recordset
*/
- function &getConstraints($table) {
+ function getConstraints($table) {
$this->clean($table);
$status = $this->beginTransaction();
* @param $table The table to find referrers for
* @return A recordset
*/
- function &getReferrers($table) {
+ function getReferrers($table) {
// In PostgreSQL < 7.3, there is no way to discover foreign keys
return -99;
}
* @param $unique Only get unique/pk indexes
* @return A recordset
*/
- function &getIndexes($table = '', $unique = false) {
+ function getIndexes($table = '', $unique = false) {
$this->clean($table);
$sql = "SELECT c2.relname AS indname, i.indisprimary, i.indisunique, pg_get_indexdef(i.indexrelid) AS inddef
FROM pg_class c, pg_class c2, pg_index i
* @param $table The table to find rules for
* @return A recordset
*/
- function &getRules($table) {
+ function getRules($table) {
$this->clean($table);
$sql = "SELECT
* Returns a list of all views in the database
* @return All views
*/
- function &getViews() {
+ function getViews() {
global $conf;
if (!$conf['show_system'])
* @param $view The name of the view to retrieve
* @return View info
*/
- function &getView($view) {
+ function getView($view) {
$this->clean($view);
$sql = "SELECT viewname AS relname, viewowner AS relowner, definition AS vwdefinition,
* Returns a list of all operators in the database
* @return All operators
*/
- function &getOperators() {
+ function getOperators() {
global $conf;
if (!$conf['show_system'])
$where = "WHERE po.oid > '{$this->_lastSystemOID}'::oid";
* Returns all users in the database cluster
* @return All users
*/
- function &getUsers() {
+ function getUsers() {
$sql = "SELECT usename, usesuper, usecreatedb, valuntil AS useexpires";
if ($this->hasUserSessionDefaults()) $sql .= ", useconfig";
$sql .= " FROM pg_user ORDER BY usename";
* @param $username The username of the user to retrieve
* @return The user's data
*/
- function &getUser($username) {
+ function getUser($username) {
$this->clean($username);
$sql = "SELECT usename, usesuper, usecreatedb, valuntil AS useexpires";
* Returns all groups in the database cluser
* @return All groups
*/
- function &getGroups() {
+ function getGroups() {
$sql = "SELECT groname FROM pg_group ORDER BY groname";
return $this->selectSet($sql);
* @param $groname The name of the group
* @return All users in the group
*/
- function &getGroup($groname) {
+ function getGroup($groname) {
$this->clean($groname);
$sql = "SELECT grolist FROM pg_group WHERE groname = '{$groname}'";
* @param $domains Ignored
* @return A recordet
*/
- function &getTypes($all = false, $tabletypes = false, $domains = false) {
+ function getTypes($all = false, $tabletypes = false, $domains = false) {
global $conf;
if ($all || $conf['show_system']) {
* @param $typname The name of the view to retrieve
* @return Type info
*/
- function &getType($typname) {
+ function getType($typname) {
$this->clean($typname);
$sql = "SELECT *, typinput AS typin, typoutput AS typout
* @param $trigger An array containing fields from the trigger table
* @return The trigger definition string
*/
- function &getTriggerDef($trigger) {
+ function getTriggerDef($trigger) {
// Constants to figure out tgtype
if (!defined('TRIGGER_TYPE_ROW')) define ('TRIGGER_TYPE_ROW', (1 << 0));
* @param $table The name of a table whose triggers to retrieve
* @return A recordset
*/
- function &getTriggers($table = '') {
+ function getTriggers($table = '') {
$this->clean($table);
// We include constraint triggers
* @param $all If true, will find all available functions, if false just userland ones
* @return All functions
*/
- function &getFunctions($all = false) {
+ function getFunctions($all = false) {
global $conf;
if ($all || $conf['show_system'])
/**
* Returns a list of all functions that can be used in triggers
*/
- function &getTriggerFunctions() {
+ function getTriggerFunctions() {
return $this->getFunctions(true);
}
* @param $all True to get all languages, regardless of show_system
* @return A recordset
*/
- function &getLanguages($all = false) {
+ function getLanguages($all = false) {
global $conf;
if ($conf['show_system'] || $all)
* Gets all aggregates
* @return A recordset
*/
- function &getAggregates() {
+ function getAggregates() {
global $conf;
if ($conf['show_system'])
* Gets all opclasses
* @return A recordset
*/
- function &getOpClasses() {
+ function getOpClasses() {
global $conf;
if ($conf['show_system'])
* @return -3 page or page_size invalid
* @return -4 unknown type
*/
- function &browseQuery($type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages) {
+ function browseQuery($type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages) {
// Check that we're not going to divide by zero
if (!is_numeric($page_size) || $page_size != (int)$page_size || $page_size <= 0) return -3;
* @return A recordset on success
* @return -1 Failed to set datestyle
*/
- function &dumpRelation($relation, $oids) {
+ function dumpRelation($relation, $oids) {
$this->fieldClean($relation);
// Actually retrieve the rows
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres71.php,v 1.71 2005/05/02 15:47:26 chriskl Exp $
+ * $Id: Postgres71.php,v 1.72 2005/07/31 09:15:06 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
// Help functions
- function &getHelpPages() {
+ function getHelpPages() {
include_once('./help/PostgresDoc71.php');
return $this->help_page;
}
* Return all database available on the server
* @return A list of databases, sorted alphabetically
*/
- function &getDatabases($currentdatabase = NULL) {
+ function getDatabases($currentdatabase = NULL) {
global $conf, $misc;
$server_info = $misc->getServerInfo();
* @param $field (optional) The name of a field to return
* @return All attributes in order
*/
- function &getTableAttributes($table, $field = '') {
+ function getTableAttributes($table, $field = '') {
$this->clean($table);
$this->clean($field);
* @return 0 success
* @return -1 sequence not found
*/
- function &resetSequence($sequence) {
+ function resetSequence($sequence) {
// Get the minimum value of the sequence
$seq = &$this->getSequence($sequence);
if ($seq->recordCount() != 1) return -1;
* @param $table The table to find rules for
* @return A recordset
*/
- function &getConstraints($table) {
+ function getConstraints($table) {
$this->clean($table);
$status = $this->beginTransaction();
* @param $table The name of a table whose triggers to retrieve
* @return A recordset
*/
- function &getTriggers($table = '') {
+ function getTriggers($table = '') {
$this->clean($table);
// We include constraint triggers
* Gets all aggregates
* @return A recordset
*/
- function &getAggregates() {
+ function getAggregates() {
global $conf;
if ($conf['show_system'])
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres72.php,v 1.79 2005/05/02 15:47:26 chriskl Exp $
+ * $Id: Postgres72.php,v 1.80 2005/07/31 09:15:06 chriskl Exp $
*/
// Help functions
- function &getHelpPages() {
+ function getHelpPages() {
include_once('./help/PostgresDoc72.php');
return $this->help_page;
}
* @param $database (optional) Find only connections to specified database
* @return A recordset
*/
- function &getProcesses($database = null) {
+ function getProcesses($database = null) {
if ($database === null)
$sql = "SELECT * FROM pg_stat_activity ORDER BY datname, usename, procpid";
else {
* @param $table The name of the table
* @return A recordset
*/
- function &getTable($table) {
+ function getTable($table) {
$this->clean($table);
$sql = "SELECT pc.relname,
* @param $all True to fetch all tables, false for just in current schema
* @return All tables, sorted alphabetically
*/
- function &getTables($all = false) {
+ function getTables($all = false) {
global $conf;
if (!$conf['show_system'] || $all) $where = "AND c.relname NOT LIKE 'pg\\\\_%' ";
else $where = '';
* @param $field (optional) The name of a field to return
* @return All attributes in order
*/
- function &getTableAttributes($table, $field = '') {
+ function getTableAttributes($table, $field = '') {
$this->clean($table);
$this->clean($field);
* Returns a list of all views in the database
* @return All views
*/
- function &getViews() {
+ function getViews() {
global $conf;
if (!$conf['show_system'])
* @param $view The name of the view to retrieve
* @return View info
*/
- function &getView($view) {
+ function getView($view) {
$this->clean($view);
$sql = "SELECT viewname AS relname, viewowner AS relowner, definition AS vwdefinition,
* @param $all If true, will find all available functions, if false just userland ones
* @return All functions
*/
- function &getFunctions($all = false) {
+ function getFunctions($all = false) {
if ($all)
$where = '';
else
* @param $domains Ignored
* @return A recordet
*/
- function &getTypes($all = false, $tabletypes = false, $domains = false) {
+ function getTypes($all = false, $tabletypes = false, $domains = false) {
global $conf;
if ($all || $conf['show_system']) {
* @param $database The database to fetch stats for
* @return A recordset
*/
- function &getStatsDatabase($database) {
+ function getStatsDatabase($database) {
$this->clean($database);
$sql = "SELECT * FROM pg_stat_database WHERE datname='{$database}'";
* @param $table The table to fetch stats for
* @return A recordset
*/
- function &getStatsTableTuples($table) {
+ function getStatsTableTuples($table) {
$this->clean($table);
$sql = 'SELECT * FROM pg_stat_all_tables WHERE';
* @param $table The table to fetch stats for
* @return A recordset
*/
- function &getStatsTableIO($table) {
+ function getStatsTableIO($table) {
$this->clean($table);
$sql = 'SELECT * FROM pg_statio_all_tables WHERE';
* @param $table The table to fetch index stats for
* @return A recordset
*/
- function &getStatsIndexTuples($table) {
+ function getStatsIndexTuples($table) {
$this->clean($table);
$sql = 'SELECT * FROM pg_stat_all_indexes WHERE';
* @param $table The table to fetch index stats for
* @return A recordset
*/
- function &getStatsIndexIO($table) {
+ function getStatsIndexIO($table) {
$this->clean($table);
$sql = 'SELECT * FROM pg_statio_all_indexes WHERE';
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres73.php,v 1.148 2005/07/26 18:49:19 xzilla Exp $
+ * $Id: Postgres73.php,v 1.149 2005/07/31 09:15:07 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
// Help functions
- function &getHelpPages() {
+ function getHelpPages() {
include_once('./help/PostgresDoc73.php');
return $this->help_page;
}
* Return all schemas in the current database
* @return All schemas, sorted alphabetically - but with PUBLIC first (if it exists)
*/
- function &getSchemas() {
+ function getSchemas() {
global $conf, $slony;
if (!$conf['show_system']) {
* @param $schema The name of the schema
* @return Schema information
*/
- function &getSchemaByName($schema) {
+ function getSchemaByName($schema) {
$this->clean($schema);
$sql = "SELECT nspname, nspowner, nspacl, pg_catalog.obj_description(pn.oid, 'pg_namespace') as nspcomment
FROM pg_catalog.pg_namespace pn
* Returns all available variable information.
* @return A recordset
*/
- function &getVariables() {
+ function getVariables() {
$sql = "SHOW ALL";
return $this->selectSet($sql);
* @param $database (optional) Find only connections to specified database
* @return A recordset
*/
- function &getProcesses($database = null) {
+ function getProcesses($database = null) {
if ($database === null)
$sql = "SELECT * FROM pg_catalog.pg_stat_activity ORDER BY datname, usename, procpid";
else {
* @param $table The name of the table
* @return A recordset
*/
- function &getTable($table) {
+ function getTable($table) {
$this->clean($table);
$sql = "
* @param $all True to fetch all tables, false for just in current schema
* @return All tables, sorted alphabetically
*/
- function &getTables($all = false) {
+ function getTables($all = false) {
if ($all) {
// Exclude pg_catalog and information_schema tables
$sql = "SELECT schemaname AS nspname, tablename AS relname, tableowner AS relowner
* @param $field (optional) The name of a field to return
* @return All attributes in order
*/
- function &getTableAttributes($table, $field = '') {
+ function getTableAttributes($table, $field = '') {
$this->clean($table);
$this->clean($field);
* @param $table The table to find the parents for
* @return A recordset
*/
- function &getTableParents($table) {
+ function getTableParents($table) {
$this->clean($table);
$sql = "
* @param $table The table to find the children for
* @return A recordset
*/
- function &getTableChildren($table) {
+ function getTableChildren($table) {
$this->clean($table);
$sql = "
* @param $view The name of the view to retrieve
* @return View info
*/
- function &getView($view) {
+ function getView($view) {
$this->clean($view);
$sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner,
* Returns all sequences in the current database
* @return A recordset
*/
- function &getSequences($all = false) {
+ function getSequences($all = false) {
if ($all) {
// Exclude pg_catalog and information_schema tables
$sql = "SELECT n.nspname, c.relname AS seqname, u.usename AS seqowner
* @param $sequence Sequence name
* @return A recordset
*/
- function &getSequence($sequence) {
+ function getSequence($sequence) {
$this->fieldClean($sequence);
$sql = "SELECT sequence_name AS seqname, *, pg_catalog.obj_description(s.tableoid, 'pg_class') AS seqcomment FROM \"{$sequence}\" AS s";
* @param $unique Only get unique/pk indexes
* @return A recordset
*/
- function &getIndexes($table = '', $unique = false) {
+ function getIndexes($table = '', $unique = false) {
$this->clean($table);
$sql = "SELECT c2.relname AS indname, i.indisprimary, i.indisunique, i.indisclustered,
* @param $trigger The name of the trigger to retrieve
* @return A recordset
*/
- function &getTrigger($table, $trigger) {
+ function getTrigger($table, $trigger) {
$this->clean($table);
$this->clean($trigger);
* @param $table The name of a table whose triggers to retrieve
* @return A recordset
*/
- function &getTriggers($table = '') {
+ function getTriggers($table = '') {
$this->clean($table);
$sql = "SELECT t.tgname, t.tgisconstraint, t.tgdeferrable, t.tginitdeferred, t.tgtype,
*
* @return All functions
*/
- function &getFunctions($all = false, $type = null) {
+ function getFunctions($all = false, $type = null) {
if ($all) {
$where = 'pg_catalog.pg_function_is_visible(p.oid)';
$distinct = 'DISTINCT ON (p.proname)';
/**
* Returns a list of all functions that can be used in triggers
*/
- function &getTriggerFunctions() {
+ function getTriggerFunctions() {
return $this->getFunctions(true, 'trigger');
}
* @param $domains If true, will include domains
* @return A recordet
*/
- function &getTypes($all = false, $tabletypes = false, $domains = false) {
+ function getTypes($all = false, $tabletypes = false, $domains = false) {
if ($all)
$where = 'pg_catalog.pg_type_is_visible(t.oid)';
else
* @param $table The table to find rules for
* @return A recordset
*/
- function &getRules($table) {
+ function getRules($table) {
$this->clean($table);
$sql = "SELECT
* @return An array of linked tables and columns
* @return -1 $tables isn't an array
*/
- function &getLinkingKeys($tables) {
+ function getLinkingKeys($tables) {
if (!is_array($tables)) return -1;
* @param $table The table to find rules for
* @return A recordset
*/
- function &getConstraints($table) {
+ function getConstraints($table) {
$this->clean($table);
/* This query finds all foreign key and check constraints in the pg_constraint
* @param $table The table to find referrers for
* @return A recordset
*/
- function &getReferrers($table) {
+ function getReferrers($table) {
$this->clean($table);
$status = $this->beginTransaction();
* @param $domain The name of the domain to fetch
* @return A recordset
*/
- function &getDomain($domain) {
+ function getDomain($domain) {
$this->clean($domain);
$sql = "
* Return all domains in current schema. Excludes domain constraints.
* @return All tables, sorted alphabetically
*/
- function &getDomains() {
+ function getDomains() {
$sql = "
SELECT
t.typname AS domname,
* Returns a list of all operators in the database
* @return All operators
*/
- function &getOperators() {
+ function getOperators() {
// We stick with the subselects here, as you cannot ORDER BY a regtype
$sql = "
SELECT
* Returns a list of all casts in the database
* @return All casts
*/
- function &getCasts() {
+ function getCasts() {
global $conf;
if ($conf['show_system'])
* Returns a list of all conversions in the database
* @return All conversions
*/
- function &getConversions() {
+ function getConversions() {
$sql = "
SELECT
c.conname,
* @param $all True to get all languages, regardless of show_system
* @return A recordset
*/
- function &getLanguages($all = false) {
+ function getLanguages($all = false) {
global $conf;
if ($conf['show_system'] || $all)
* Gets all aggregates
* @return A recordset
*/
- function &getAggregates() {
+ function getAggregates() {
$sql = "
SELECT
p.proname,
* Gets all opclasses
* @return A recordset
*/
- function &getOpClasses() {
+ function getOpClasses() {
$sql = "
SELECT
pa.amname,
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres74.php,v 1.46 2005/07/26 18:49:19 xzilla Exp $
+ * $Id: Postgres74.php,v 1.47 2005/07/31 09:15:07 chriskl Exp $
*/
include_once('./classes/database/Postgres73.php');
// Help functions
- function &getHelpPages() {
+ function getHelpPages() {
include_once('./help/PostgresDoc74.php');
return $this->help_page;
}
* @param $groname The name of the group
* @return All users in the group
*/
- function &getGroup($groname) {
+ function getGroup($groname) {
$this->clean($groname);
$sql = "SELECT s.usename FROM pg_catalog.pg_user s, pg_catalog.pg_group g
* in 7.3 only in that it considers the information_schema to be a system schema.
* @return All schemas, sorted alphabetically
*/
- function &getSchemas() {
+ function getSchemas() {
global $conf, $slony;
if (!$conf['show_system']) {
* @param $unique Only get unique/pk indexes
* @return A recordset
*/
- function &getIndexes($table = '', $unique = false) {
+ function getIndexes($table = '', $unique = false) {
$this->clean($table);
$sql = "SELECT c2.relname AS indname, i.indisprimary, i.indisunique, i.indisclustered,
* @param $view The name of the view to retrieve
* @return View info
*/
- function &getView($view) {
+ function getView($view) {
$this->clean($view);
$sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner,
* @param $table The name of a table whose triggers to retrieve
* @return A recordset
*/
- function &getTriggers($table = '') {
+ function getTriggers($table = '') {
$this->clean($table);
$sql = "SELECT t.tgname, pg_catalog.pg_get_triggerdef(t.oid) AS tgdef
* @param $table The table to find rules for
* @return A recordset
*/
- function &getConstraints($table) {
+ function getConstraints($table) {
$this->clean($table);
// This SQL is greatly complicated by the need to retrieve
* @param $domain The name of the domain whose constraints to fetch
* @return A recordset
*/
- function &getDomainConstraints($domain) {
+ function getDomainConstraints($domain) {
$this->clean($domain);
$sql = "
/**
* PostgreSQL 8.0 support
*
- * $Id: Postgres80.php,v 1.16 2005/07/26 18:49:19 xzilla Exp $
+ * $Id: Postgres80.php,v 1.17 2005/07/31 09:15:07 chriskl Exp $
*/
include_once('./classes/database/Postgres74.php');
// Help functions
- function &getHelpPages() {
+ function getHelpPages() {
include_once('./help/PostgresDoc80.php');
return $this->help_page;
}
* Return all database available on the server
* @return A list of databases, sorted alphabetically
*/
- function &getDatabases($currentdatabase = NULL) {
+ function getDatabases($currentdatabase = NULL) {
global $conf, $misc;
$server_info = $misc->getServerInfo();
* @param $all True to fetch all tables, false for just in current schema
* @return All tables, sorted alphabetically
*/
- function &getTables($all = false) {
+ function getTables($all = false) {
if ($all) {
// Exclude pg_catalog and information_schema tables
$sql = "SELECT schemaname AS nspname, tablename AS relname, tableowner AS relowner
* @param $table The name of the table
* @return A recordset
*/
- function &getTable($table) {
+ function getTable($table) {
$this->clean($table);
$sql = "
* Returns all sequences in the current database
* @return A recordset
*/
- function &getSequences($all = false) {
+ function getSequences($all = false) {
if ($all) {
// Exclude pg_catalog and information_schema tables
$sql = "SELECT n.nspname, c.relname AS seqname, u.usename AS seqowner
/**
* PostgreSQL 8.1 support
*
- * $Id: Postgres81.php,v 1.1 2005/03/15 02:44:10 chriskl Exp $
+ * $Id: Postgres81.php,v 1.2 2005/07/31 09:15:07 chriskl Exp $
*/
include_once('./classes/database/Postgres80.php');
// Help functions
- function &getHelpPages() {
+ function getHelpPages() {
include_once('./help/PostgresDoc81.php');
return $this->help_page;
}
/**
* Function library read in upon startup
*
- * $Id: lib.inc.php,v 1.100 2005/07/31 08:40:26 chriskl Exp $
+ * $Id: lib.inc.php,v 1.101 2005/07/31 09:15:07 chriskl Exp $
*/
include_once('decorator.inc.php');
include_once('./lang/translations.php');
- // Set error reporting level to max, no strict
- if (defined('E_STRICT'))
- error_reporting(E_ALL & !E_STRICT);
- else
- error_reporting(E_ALL);
+ // Set error reporting level to max
+ error_reporting(E_ALL);
// Application name
$appName = 'phpPgAdmin';