diff options
author | ioguix | 2010-09-07 14:47:53 +0000 |
---|---|---|
committer | ioguix | 2010-09-07 14:47:53 +0000 |
commit | 4c75fc0482fb4ee00387d81faa9fb10b7c355ab7 (patch) | |
tree | d89729d2c680397f4f25cd4f93b466a0a5658170 | |
parent | 927e0892d796f468af7a44c89d272ed4275dd610 (diff) |
Really remove support for 7.3 as we already adverstised it
-rw-r--r-- | TODO | 1 | ||||
-rwxr-xr-x | classes/database/Connection.php | 9 | ||||
-rwxr-xr-x | classes/database/Postgres.php | 3 | ||||
-rw-r--r-- | classes/database/Postgres73.php | 551 | ||||
-rw-r--r-- | conf/config.inc.php-dist | 2 | ||||
-rw-r--r-- | help/PostgresDoc73.php | 157 | ||||
-rw-r--r-- | help/PostgresDoc74.php | 155 | ||||
-rw-r--r-- | libraries/lib.inc.php | 2 |
8 files changed, 158 insertions, 722 deletions
@@ -124,6 +124,7 @@ Indexes * Support 8.1 Reindex System commands * Expressional indexes * Create Index Asc/Desc, Nulls First/Last [8.3] +* remove FORCE as it is now ignore since 7.4 Types diff --git a/classes/database/Connection.php b/classes/database/Connection.php index 8a61b9f9..f98871b7 100755 --- a/classes/database/Connection.php +++ b/classes/database/Connection.php @@ -46,8 +46,8 @@ class Connection { * Gets the name of the correct database driver to use. As a side effect, * sets the platform. * @param (return-by-ref) $description A description of the database and version - * @return The class name of the driver eg. Postgres73 - * @return null if version is < 7.0 + * @return The class name of the driver eg. Postgres84 + * @return null if version is < 7.4 * @return -3 Database-specific failure */ function getDriver(&$description) { @@ -73,7 +73,7 @@ class Connection { $params = explode(' ', $field); if (!isset($params[1])) return -3; - $version = $params[1]; // eg. 7.3.2 + $version = $params[1]; // eg. 8.4.4 } $description = "PostgreSQL {$version}"; @@ -87,10 +87,9 @@ class Connection { case '8.0': case '7.5': return 'Postgres80'; break; case '7.4': return 'Postgres74'; break; - case '7.3': return 'Postgres73'; break; } - /* All <7.3 versions are not supported */ + /* All <7.4 versions are not supported */ // if major version is 7 or less and wasn't catch in the // switch/case block, we have an unsupported version. if ((int)substr($version, 0, 1) < 8) diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 430717b2..d6ebff13 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -845,8 +845,7 @@ class Postgres extends ADODB_base { // Schema functons /** - * Return all schemas in the current database. This differs from the version - * in 7.3 only in that it considers the information_schema to be a system schema. + * Return all schemas in the current database. * @return All schemas, sorted alphabetically */ function getSchemas() { diff --git a/classes/database/Postgres73.php b/classes/database/Postgres73.php deleted file mode 100644 index dd806db1..00000000 --- a/classes/database/Postgres73.php +++ /dev/null @@ -1,551 +0,0 @@ -<?php - -/** - * A class that implements the DB interface for Postgres - * Note: This class uses ADODB and returns RecordSets. - * - * $Id: Postgres73.php,v 1.186 2008/01/19 13:46:15 ioguix Exp $ - */ - -// @@@ THOUGHT: What about inherits? ie. use of ONLY??? - -include_once('./classes/database/Postgres74.php'); - -class Postgres73 extends Postgres74 { - - var $major_version = 7.3; - // How often to execute the trigger - var $triggerFrequency = array('ROW'); - - /** - * Constructor - * @param $conn The database connection - */ - function Postgres73($conn) { - $this->Postgres74($conn); - } - - // Help functions - - function getHelpPages() { - include_once('./help/PostgresDoc73.php'); - return $this->help_page; - } - - // Database functions - - /** - * Return all schemas in the current database - * @return All schemas, sorted alphabetically - but with PUBLIC first (if it exists) - */ - function getSchemas() { - global $conf, $slony; - - if (!$conf['show_system']) { - $where = "WHERE nspname NOT LIKE 'pg\\\\_%'"; - if (isset($slony) && $slony->isEnabled()) { - $temp = $slony->slony_schema; - $this->clean($temp); - $where .= " AND nspname != '{$temp}'"; - } - } - else $where = "WHERE nspname !~ '^pg_t(emp_[0-9]+|oast)$'"; - $sql = " - SELECT pn.nspname, pu.usename AS nspowner, - pg_catalog.obj_description(pn.oid, 'pg_namespace') AS nspcomment - FROM pg_catalog.pg_namespace pn LEFT JOIN pg_catalog.pg_user pu ON (pn.nspowner = pu.usesysid) - {$where} - ORDER BY nspname"; - - return $this->selectSet($sql); - } - - // Trigger functions - - /** - * Grabs a list of triggers on a table - * @param $table The name of a table whose triggers to retrieve - * @return A recordset - */ - function getTriggers($table = '') { - $c_schema = $this->_schema; - $this->clean($c_schema); - $this->clean($table); - - $sql = "SELECT t.tgname, t.tgisconstraint, t.tgdeferrable, t.tginitdeferred, t.tgtype, - t.tgargs, t.tgnargs, t.tgconstrrelid, - (SELECT relname FROM pg_catalog.pg_class c2 WHERE c2.oid=t.tgconstrrelid) AS tgconstrrelname, - p.proname AS tgfname, c.relname, NULL AS tgdef, - p.proname || ' (' || pg_catalog.oidvectortypes(p.proargtypes) || ')' AS proproto, - ns.nspname AS pronamespace - FROM pg_catalog.pg_namespace ns, - pg_catalog.pg_trigger t LEFT JOIN pg_catalog.pg_proc p - ON t.tgfoid=p.oid, pg_catalog.pg_class c - WHERE t.tgrelid=c.oid - AND c.relname='{$table}' - AND c.relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}') - AND (NOT tgisconstraint OR NOT EXISTS - (SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c - ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) - WHERE d.classid = t.tableoid AND d.objid = t.oid AND d.deptype = 'i' AND c.contype = 'f')) - AND p.pronamespace = ns.oid"; - - return $this->selectSet($sql); - } - - // Table functions - - /** - * Get the fields for uniquely identifying a row in a table - * @param $table The table for which to retrieve the identifier - * @return An array mapping attribute number to attribute name, empty for no identifiers - * @return -1 error - */ - function getRowIdentifier($table) { - $oldtable = $table; - $c_schema = $this->_schema; - $this->clean($c_schema); - $this->clean($table); - - $status = $this->beginTransaction(); - if ($status != 0) return -1; - - // Get the first primary or unique index (sorting primary keys first) that - // is NOT a partial index. - $sql = "SELECT indrelid, indkey FROM pg_catalog.pg_index WHERE indisunique AND - indrelid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' AND - relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')) - AND indpred='' AND indproc='-' ORDER BY indisprimary DESC LIMIT 1"; - $rs = $this->selectSet($sql); - - // If none, check for an OID column. Even though OIDs can be duplicated, the edit and delete row - // functions check that they're only modiying a single row. Otherwise, return empty array. - if ($rs->recordCount() == 0) { - // Check for OID column - $temp = array(); - if ($this->hasObjectID($table)) { - $temp = array('oid'); - } - $this->endTransaction(); - return $temp; - } - // Otherwise find the names of the keys - else { - $attnames = $this->getAttributeNames($oldtable, explode(' ', $rs->fields['indkey'])); - if (!is_array($attnames)) { - $this->rollbackTransaction(); - return -1; - } - else { - $this->endTransaction(); - return $attnames; - } - } - } - - // View function - - /** - * Returns all details for a particular view - * @param $view The name of the view to retrieve - * @return View info - */ - function getView($view) { - $c_schema = $this->_schema; - $this->clean($c_schema); - $this->clean($view); - - $sql = " - SELECT c.relname, n.nspname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner, - pg_catalog.pg_get_viewdef(c.oid) AS vwdefinition, pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment - FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace) - WHERE (c.relname = '$view') - AND n.nspname='{$c_schema}'"; - - return $this->selectSet($sql); - } - - // Sequence functions - - /** - * Protected method which alter a sequence - * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION - * @param $seqrs The sequence recordSet returned by getSequence() - * @param $name The new name for the sequence - * @param $comment The comment on the sequence - * @param $owner The new owner for the sequence - * @param $schema The new schema for the sequence - * @param $increment The increment - * @param $minvalue The min value - * @param $maxvalue The max value - * @param $startvalue The starting value - * @param $cachevalue The cache value - * @param $cycledvalue True if cycled, false otherwise - * @return 0 success - * @return -3 rename error - * @return -4 comment error - * @return -5 owner error - */ - protected - function _alterSequence($seqrs, $name, $comment, $owner, $schema, $increment, - $minvalue, $maxvalue, $startvalue, $cachevalue, $cycledvalue) { - /* $schema not supported in pg80- */ - $this->fieldArrayClean($seqrs->fields); - - // Comment - $status = $this->setComment('SEQUENCE', $seqrs->fields['seqname'], '', $comment); - if ($status != 0) - return -4; - - // Owner - $this->fieldClean($owner); - $status = $this->alterSequenceOwner($seqrs, $owner); - if ($status != 0) - return -5; - - // Rename - $this->fieldClean($name); - $status = $this->alterSequenceName($seqrs, $name); - if ($status != 0) - return -3; - - return 0; - } - - // Index functions - - /** - * Grabs a list of indexes for a table - * @param $table The name of a table whose indexes to retrieve - * @param $unique Only get unique/pk indexes - * @return A recordset - */ - function getIndexes($table = '', $unique = false) { - $this->clean($table); - - $sql = "SELECT c2.relname AS indname, i.indisprimary, i.indisunique, i.indisclustered, - pg_catalog.pg_get_indexdef(i.indexrelid) AS inddef, - pg_catalog.obj_description(c.oid, 'pg_index') AS idxcomment - FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i - WHERE c.relname = '{$table}' AND pg_catalog.pg_table_is_visible(c.oid) - AND c.oid = i.indrelid AND i.indexrelid = c2.oid - "; - if ($unique) $sql .= " AND i.indisunique "; - $sql .= " ORDER BY c2.relname"; - - return $this->selectSet($sql); - } - - // Role, User and Group functions - - /** - * Returns users in a specific group - * @param $groname The name of the group - * @return All users in the group - */ - function getGroup($groname) { - $this->clean($groname); - - $sql = "SELECT grolist FROM pg_group WHERE groname = '{$groname}'"; - - $grodata = $this->selectSet($sql); - if ($grodata->fields['grolist'] !== null && $grodata->fields['grolist'] != '{}') { - $members = $grodata->fields['grolist']; - $members = preg_replace("/\{|\}/","",$members); - $this->clean($members); - - $sql = "SELECT usename FROM pg_user WHERE usesysid IN ({$members}) ORDER BY usename"; - } - else $sql = "SELECT usename FROM pg_user WHERE false"; - - return $this->selectSet($sql); - } - - // Function functions - - /** - * Updates (replaces) a function. - * @param $function_oid The OID of the function - * @param $funcname The name of the function to create - * @param $newname The new name for the function - * @param $args The array of argument types - * @param $returns The return type - * @param $definition The definition for the new function - * @param $language The language the function is written for - * @param $flags An array of optional flags - * @param $setof True if returns a set, false otherwise - * @param $comment The comment on the function - * @return 0 success - * @return -1 transaction error - * @return -2 drop function error - * @return -3 create function error - */ - function setFunction($function_oid, $funcname, $newname, $args, $returns, $definition, $language, $flags, $setof, $rows, $cost, $comment) { - // Begin a transaction - $status = $this->beginTransaction(); - if ($status != 0) { - $this->rollbackTransaction(); - return -1; - } - - // Replace the existing function - if ($funcname != $newname) { - $status = $this->dropFunction($function_oid, false); - if ($status != 0) { - $this->rollbackTransaction(); - return -2; - } - - $status = $this->createFunction($newname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, false); - if ($status != 0) { - $this->rollbackTransaction(); - return -3; - } - } else { - $status = $this->createFunction($funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, true); - if ($status != 0) { - $this->rollbackTransaction(); - return -3; - } - } - - // Comment on the function - /*$this->fieldClean($newname); - $status = $this->setComment('FUNCTION', "\"{$newname}\"({$args})", null, $comment); - if ($status != 0) { - $this->rollbackTransaction(); - return -4; - }*/ - - return $this->endTransaction(); - } - - // Constraint functions - - /** - * Returns a list of all constraints on a table - * @param $table The table to find rules for - * @return A recordset - */ - function getConstraints($table) { - $c_schema = $this->_schema; - $this->clean($c_schema); - $this->clean($table); - - /* This query finds all foreign key and check constraints in the pg_constraint - * table, and unions that with all indexes that are the basis for unique or - * primary key constraints. */ - $sql = " - SELECT conname, consrc, contype, indkey, indisclustered FROM ( - SELECT - conname, - CASE WHEN contype='f' THEN - pg_catalog.pg_get_constraintdef(oid) - ELSE - 'CHECK (' || consrc || ')' - END AS consrc, - contype, - conrelid AS relid, - NULL AS indkey, - FALSE AS indisclustered - FROM - pg_catalog.pg_constraint - WHERE - contype IN ('f', 'c') - UNION ALL - SELECT - pc.relname, - NULL, - CASE WHEN indisprimary THEN - 'p' - ELSE - 'u' - END, - pi.indrelid, - indkey, - pi.indisclustered - FROM - pg_catalog.pg_class pc, - pg_catalog.pg_index pi - WHERE - pc.oid=pi.indexrelid - AND EXISTS ( - SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c - ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) - WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') - ) - ) AS sub - WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' - AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace - WHERE nspname='{$c_schema}')) - ORDER BY - 1 - "; - - return $this->selectSet($sql); - } - - /** - * Returns a list of all constraints on a table, - * including constraint name, definition, related col and referenced namespace, - * table and col if needed - * @param $table the table where we are looking for fk - * @return a recordset - */ - function getConstraintsWithFields($table) { - global $data; - - $data->clean($table); - $c_schema = $this->_schema; - $this->clean($c_schema); - - // get the max number of col used in a constraint for the table - $sql = "SELECT DISTINCT - max(SUBSTRING(array_dims(c.conkey) FROM '^\\\[.*:(.*)\\\]$')) as nb - FROM - pg_catalog.pg_constraint AS c - JOIN pg_catalog.pg_class AS r ON (c.conrelid = r.oid) - JOIN pg_catalog.pg_namespace AS ns ON r.relnamespace=ns.oid - WHERE - r.relname = '{$table}' AND ns.nspname='{$c_schema}'"; - - $rs = $this->selectSet($sql); - - if ($rs->EOF) $max_col_cstr = 0; - else $max_col_cstr = $rs->fields['nb']; - - // get the max number of col used in a constraint for the table - $sql = "SELECT i.indkey - FROM - pg_catalog.pg_index AS i - JOIN pg_catalog.pg_class AS r ON (i.indrelid = r.oid) - JOIN pg_catalog.pg_namespace AS ns ON r.relnamespace=ns.oid - WHERE - r.relname = '{$table}' AND ns.nspname='{$c_schema}'"; - - /* parse our output to find the highest dimension of index keys since - * i.indkey is stored in an int2vector */ - $max_col_ind = 0; - $rs = $this->selectSet($sql); - while (!$rs->EOF) { - $tmp = count(explode(' ', $rs->fields['indkey'])); - $max_col_ind = $tmp > $max_col_ind ? $tmp : $max_col_ind; - $rs->MoveNext(); - } - - $sql = " - SELECT oid AS conid, contype, conname, consrc, ns1.nspname as p_schema, sub.relname as p_table, - f_schema, f_table, p_field, f_field, indkey, confrelid - FROM ( - SELECT - contype, conname, - CASE WHEN contype='f' THEN - pg_catalog.pg_get_constraintdef(c.oid) - ELSE - 'CHECK (' || consrc || ')' - END AS consrc, r1.relname, - f1.attname as p_field, f1.attnum AS p_attnum, ns2.nspname as f_schema, r2.relname as f_table, - conrelid, r1.relnamespace, f2.attname as f_field, f2.attnum AS f_attnum, NULL AS indkey - FROM - pg_catalog.pg_constraint AS c - JOIN pg_catalog.pg_class AS r1 ON (c.conrelid=r1.oid) - JOIN pg_catalog.pg_attribute AS f1 ON ((f1.attrelid=c.conrelid) AND (f1.attnum=c.conkey[1]"; - for ($i = 2; $i <= $max_col_cstr; $i++) { - $sql.= " OR f1.attnum=c.conkey[$i]"; - } - $sql .= ")) - LEFT JOIN ( - pg_catalog.pg_class AS r2 JOIN pg_catalog.pg_namespace AS ns2 ON (r2.relnamespace=ns2.oid) - ) ON (c.confrelid=r2.oid) - LEFT JOIN pg_catalog.pg_attribute AS f2 ON - ((f2.attrelid=r2.oid) AND ((c.confkey[1]=f2.attnum AND c.conkey[1]=f1.attnum)"; - for ($i = 2; $i <= $max_col_cstr; $i++) - $sql.= "OR (c.confkey[$i]=f2.attnum AND c.conkey[$i]=f1.attnum)"; - $sql .= ")) - WHERE - contype IN ('f', 'c') - UNION ALL - SELECT - CASE WHEN indisprimary THEN - 'p' - ELSE - 'u' - END as contype, - pc.relname as conname, NULL as consrc, r2.relname, f1.attname as p_field, - NULL as f_schema, NULL as f_table, indrelid as conrelid, pc.relnamespace, - NULL as f_field, indkey - FROM - pg_catalog.pg_class pc, pg_catalog.pg_index pi - JOIN pg_catalog.pg_attribute AS f1 ON ((f1.attrelid=pi.indrelid) AND (f1.attnum=pi.indkey[0]"; - for ($i = 1; $i <= $max_col_ind; $i++) { - $sql.= " OR f1.attnum=pi.indkey[$i]"; - } - $sql .= ")) - JOIN pg_catalog.pg_class r2 ON (pi.indrelid=r2.oid) - WHERE - pc.oid=pi.indexrelid - AND EXISTS ( - SELECT 1 - FROM pg_catalog.pg_depend AS d - JOIN pg_catalog.pg_constraint AS c - ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) - WHERE d.classid = pc.tableoid AND d.objid = pc.oid - AND d.deptype = 'i' AND c.contype IN ('u', 'p') - ) - ) AS sub - JOIN pg_catalog.pg_namespace AS ns1 ON sub.relnamespace=ns1.oid - WHERE conrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' - AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace - WHERE nspname='{$c_schema}')) - ORDER BY 1 - "; - - return $this->selectSet($sql); - } - - // Misc functions - - /** - * Sets up the data object for a dump. eg. Starts the appropriate - * transaction, sets variables, etc. - * @return 0 success - */ - function beginDump() { - // Begin serializable transaction (to dump consistent data) - $status = $this->beginTransaction(); - if ($status != 0) return -1; - - // Set serializable - $sql = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"; - $status = $this->execute($sql); - if ($status != 0) { - $this->rollbackTransaction(); - return -1; - } - - // Set datestyle to ISO - $sql = "SET DATESTYLE = ISO"; - $status = $this->execute($sql); - if ($status != 0) { - $this->rollbackTransaction(); - return -1; - } - } - - // Capabilities - - function hasAlterAggregate() { return false; } - function hasAlterDatabaseRename() { return false; } - function hasAlterSchema() { return false; } - function hasAlterSequenceProps() { return false; } - function hasCreateTableLike() {return false;} - function hasAlterDomains() { return false; } - function hasDomainConstraints() { return false; } - function hasGrantOption() { return false; } - function hasReadOnlyQueries() { return false; } - function hasRecluster() { return false; } - function hasUserRename() { return false; } - function hasForceReindex() { return true; } -} - -?> diff --git a/conf/config.inc.php-dist b/conf/config.inc.php-dist index da7038d5..81b12523 100644 --- a/conf/config.inc.php-dist +++ b/conf/config.inc.php-dist @@ -143,7 +143,7 @@ // Base URL for PostgreSQL documentation. // '%s', if present, will be replaced with the PostgreSQL version - // (e.g. 7.3 ) + // (e.g. 8.4 ) $conf['help_base'] = 'http://www.postgresql.org/docs/%s/interactive/'; // Configuration for ajax scripts diff --git a/help/PostgresDoc73.php b/help/PostgresDoc73.php deleted file mode 100644 index 078b2dc4..00000000 --- a/help/PostgresDoc73.php +++ /dev/null @@ -1,157 +0,0 @@ -<?php - -/** - * Help links for PostgreSQL 7.3 documentation - */ - -$this->help_base = sprintf($GLOBALS['conf']['help_base'], '7.3'); - -# TODO: Check and fix links - -$this->help_page = array( - - 'pg.database' => 'managing-databases.html', - 'pg.database.create' => array('sql-createdatabase.html', 'manage-ag-createdb.html'), - 'pg.database.alter' => 'sql-alterdatabase.html', - 'pg.database.drop' => array('sql-dropdatabase.html', 'manage-ag-dropdb.html'), - - 'pg.admin.analyze' => 'sql-analyze.html', - 'pg.admin.vacuum' => 'sql-vacuum.html', - - 'pg.cast' => array('sql-expressions.html#SQL-SYNTAX-TYPE-CASTS','sql-createcast.html'), - 'pg.cast.create' => 'sql-createcast.html', - 'pg.cast.drop' => 'sql-dropcast.html', - - 'pg.column.add' => array('ddl-alter.html#AEN2115', 'sql-altertable.html'), - 'pg.column.alter' => array('ddl-alter.html','sql-altertable.html'), - 'pg.column.drop' => array('ddl-alter.html#AEN2124', 'sql-altertable.html'), - - 'pg.constraint' => 'ddl-constraints.html', - 'pg.constraint.add' => 'ddl-alter.html#AEN2131', - 'pg.constraint.check' => 'ddl-constraints.html#AEN1895', - 'pg.constraint.drop' => 'ddl-alter.html#AEN2140', - 'pg.constraint.foreign_key' => 'ddl-constraints.html#DDL-CONSTRAINTS-FK', - 'pg.constraint.primary_key' => 'ddl-constraints.html#AEN1972', - 'pg.constraint.unique_key' => 'ddl-constraints.html#AEN1950', - - 'pg.conversion' => 'multibyte.html', - 'pg.conversion.alter' => 'sql-alterconversion.html', - 'pg.conversion.create' => 'sql-createconversion.html', - 'pg.conversion.drop' => 'sql-dropconversion.html', - - 'pg.domain' => 'extend-type-system.html#AEN28657', - 'pg.domain.alter' => 'sql-alterdomain.html', - 'pg.domain.create' => 'sql-createdomain.html', - 'pg.domain.drop' => 'sql-dropdomain.html', - - 'pg.function' => array('xfunc.html', 'functions.html', 'sql-expressions.html#AEN1599'), - 'pg.function.alter' => 'sql-alterfunction.html', - 'pg.function.create' => 'sql-createfunction.html', - 'pg.function.create.c' => array('xfunc-c.html','sql-createfunction.html'), - 'pg.function.create.internal' => array('xfunc-internal.html','sql-createfunction.html'), - 'pg.function.create.pl' => array('xfunc-sql.html','xfunc-pl.html','sql-createfunction.html'), - 'pg.function.drop' => 'sql-dropfunction.html', - - 'pg.group' => 'groups.html', - 'pg.group.alter' => array('sql-altergroup.html','groups.html'), - 'pg.group.create' => 'sql-creategroup.html', - 'pg.group.drop' => 'sql-dropgroup.html', - - 'pg.index' => 'indexes.html', - 'pg.index.cluster' => 'sql-cluster.html', - 'pg.index.drop' => 'sql-dropindex.html', - 'pg.index.create' => 'sql-createindex.html', - 'pg.index.reindex' => 'sql-reindex.html', - - 'pg.language' => 'xplang.html', - 'pg.language.alter' => 'sql-alterlanguage.html', - 'pg.language.create' => 'sql-createlanguage.html', - 'pg.language.drop' => 'sql-droplanguage.html', - - 'pg.opclass' => 'indexes-opclass.html', - 'pg.opclass.alter' => 'sql-alteropclass.html', - 'pg.opclass.create' => 'sql-createopclass.html', - 'pg.opclass.drop' => 'sql-dropopclass.html', - - 'pg.operator' => array('xoper.html', 'functions.html', 'sql-expressions.html#AEN1570'), - 'pg.operator.alter' => 'sql-alteroperator.html', - 'pg.operator.create' => 'sql-createoperator.html', - 'pg.operator.drop' => 'sql-dropoperator.html', - - 'pg.pl' => 'xplang.html', - 'pg.pl.plperl' => 'plperl.html', - 'pg.pl.plpgsql' => 'plpgsql.html', - 'pg.pl.plpython' => 'plpython.html', - 'pg.pl.pltcl' => 'pltcl.html', - - 'pg.privilege' => array('privileges.html','ddl-priv.html'), - 'pg.privilege.grant' => 'sql-grant.html', - 'pg.privilege.revoke' => 'sql-revoke.html', - - 'pg.process' => 'monitoring.html', - - 'pg.rule' => 'rules.html', - 'pg.rule.create' => 'sql-createrule.html', - 'pg.rule.drop' => 'sql-droprule.html', - - 'pg.schema' => 'ddl-schemas.html', - 'pg.schema.alter' => 'sql-alterschema.html', - 'pg.schema.create' => array( 'sql-createschema.html','ddl-schemas.html#DDL-SCHEMAS-CREATE'), - 'pg.schema.drop' => 'sql-dropschema.html', - 'pg.schema.search_path' => 'ddl-schemas.html#DDL-SCHEMAS-PATH', - - 'pg.sequence' => 'functions-sequence.html', - 'pg.sequence.alter' => 'sql-altersequence.html', - 'pg.sequence.create' => 'sql-createsequence.html', - 'pg.sequence.drop' => 'sql-dropsequence.html', - - 'pg.sql' => array('sql.html','sql-commands.html'), - 'pg.sql.insert' => 'sql-insert.html', - 'pg.sql.select' => 'sql-select.html', - 'pg.sql.update' => 'sql-update.html', - - 'pg.table' => 'ddl.html#DDL-BASICS', - 'pg.table.alter' => 'sql-altertable.html', - 'pg.table.create' => 'sql-createtable.html', - 'pg.table.drop' => 'sql-droptable.html', - 'pg.table.empty' => 'sql-truncate.html', - - 'pg.tablespace' => 'manage-ag-tablespaces.html', - 'pg.tablespace.alter' => 'sql-altertablespace.html', - 'pg.tablespace.create' => 'sql-createtablespace.html', - 'pg.tablespace.drop' => 'sql-droptablespace.html', - - 'pg.trigger' => 'triggers.html', - 'pg.trigger.alter' => 'sql-altertrigger.html', - 'pg.trigger.create' => 'sql-createtrigger.html', - 'pg.trigger.drop' => 'sql-droptrigger.html', - - 'pg.type' => array('xtypes.html','datatype.html','extend-type-system.html'), - 'pg.type.alter' => 'sql-altertype.html', - 'pg.type.create' => 'sql-createtype.html', - 'pg.type.drop' => 'sql-droptype.html', - - 'pg.user.alter' => array('sql-alteruser.html','user-attributes.html'), - 'pg.user.create' => array('sql-createuser.html','user-manag.html#DATABASE-USERS'), - 'pg.user.drop' => array('sql-dropuser.html','user-manag.html#DATABASE-USERS'), - - 'pg.variable' => 'runtime-config.html', - - 'pg.view' => 'tutorial-views.html', - 'pg.view.alter' => array('sql-createview.html','sql-altertable.html'), - 'pg.view.create' => 'sql-createview.html', - 'pg.view.drop' => 'sql-dropview.html', - - 'pg.aggregate' => array('xaggr.html', 'tutorial-agg.html', 'functions-aggregate.html', 'sql-expressions.html#SYNTAX-AGGREGATES'), - 'pg.aggregate.create' => 'sql-createaggregate.html', - 'pg.aggregate.drop' => 'sql-dropaggregate.html', - - 'pg.server' => 'admin.html', - - 'pg.user' => 'user-manag.html', - - 'pg.locks' => 'view-pg-locks.html' -); - - -?> diff --git a/help/PostgresDoc74.php b/help/PostgresDoc74.php index 7e07b5e5..b8458283 100644 --- a/help/PostgresDoc74.php +++ b/help/PostgresDoc74.php @@ -1,15 +1,160 @@ <?php + /** * Help links for PostgreSQL 7.4 documentation - * - * $Id: PostgresDoc74.php,v 1.4 2005/02/16 10:27:44 jollytoad Exp $ */ - -include('./help/PostgresDoc73.php'); + $this->help_base = sprintf($GLOBALS['conf']['help_base'], '7.4'); -$this->help_page['pg.aggregate.alter'] = 'sql-alteraggregate.html'; +# TODO: Check and fix links + +$this->help_page = array( + + 'pg.database' => 'managing-databases.html', + 'pg.database.create' => array('sql-createdatabase.html', 'manage-ag-createdb.html'), + 'pg.database.alter' => 'sql-alterdatabase.html', + 'pg.database.drop' => array('sql-dropdatabase.html', 'manage-ag-dropdb.html'), + + 'pg.admin.analyze' => 'sql-analyze.html', + 'pg.admin.vacuum' => 'sql-vacuum.html', + + 'pg.cast' => array('sql-expressions.html#SQL-SYNTAX-TYPE-CASTS','sql-createcast.html'), + 'pg.cast.create' => 'sql-createcast.html', + 'pg.cast.drop' => 'sql-dropcast.html', + + 'pg.column.add' => array('ddl-alter.html#AEN2115', 'sql-altertable.html'), + 'pg.column.alter' => array('ddl-alter.html','sql-altertable.html'), + 'pg.column.drop' => array('ddl-alter.html#AEN2124', 'sql-altertable.html'), + + 'pg.constraint' => 'ddl-constraints.html', + 'pg.constraint.add' => 'ddl-alter.html#AEN2131', + 'pg.constraint.check' => 'ddl-constraints.html#AEN1895', + 'pg.constraint.drop' => 'ddl-alter.html#AEN2140', + 'pg.constraint.foreign_key' => 'ddl-constraints.html#DDL-CONSTRAINTS-FK', + 'pg.constraint.primary_key' => 'ddl-constraints.html#AEN1972', + 'pg.constraint.unique_key' => 'ddl-constraints.html#AEN1950', + + 'pg.conversion' => 'multibyte.html', + 'pg.conversion.alter' => 'sql-alterconversion.html', + 'pg.conversion.create' => 'sql-createconversion.html', + 'pg.conversion.drop' => 'sql-dropconversion.html', + + 'pg.domain' => 'extend-type-system.html#AEN28657', + 'pg.domain.alter' => 'sql-alterdomain.html', + 'pg.domain.create' => 'sql-createdomain.html', + 'pg.domain.drop' => 'sql-dropdomain.html', + + 'pg.function' => array('xfunc.html', 'functions.html', 'sql-expressions.html#AEN1599'), + 'pg.function.alter' => 'sql-alterfunction.html', + 'pg.function.create' => 'sql-createfunction.html', + 'pg.function.create.c' => array('xfunc-c.html','sql-createfunction.html'), + 'pg.function.create.internal' => array('xfunc-internal.html','sql-createfunction.html'), + 'pg.function.create.pl' => array('xfunc-sql.html','xfunc-pl.html','sql-createfunction.html'), + 'pg.function.drop' => 'sql-dropfunction.html', + + 'pg.group' => 'groups.html', + 'pg.group.alter' => array('sql-altergroup.html','groups.html'), + 'pg.group.create' => 'sql-creategroup.html', + 'pg.group.drop' => 'sql-dropgroup.html', + + 'pg.index' => 'indexes.html', + 'pg.index.cluster' => 'sql-cluster.html', + 'pg.index.drop' => 'sql-dropindex.html', + 'pg.index.create' => 'sql-createindex.html', + 'pg.index.reindex' => 'sql-reindex.html', + + 'pg.language' => 'xplang.html', + 'pg.language.alter' => 'sql-alterlanguage.html', + 'pg.language.create' => 'sql-createlanguage.html', + 'pg.language.drop' => 'sql-droplanguage.html', + + 'pg.opclass' => 'indexes-opclass.html', + 'pg.opclass.alter' => 'sql-alteropclass.html', + 'pg.opclass.create' => 'sql-createopclass.html', + 'pg.opclass.drop' => 'sql-dropopclass.html', + + 'pg.operator' => array('xoper.html', 'functions.html', 'sql-expressions.html#AEN1570'), + 'pg.operator.alter' => 'sql-alteroperator.html', + 'pg.operator.create' => 'sql-createoperator.html', + 'pg.operator.drop' => 'sql-dropoperator.html', + + 'pg.pl' => 'xplang.html', + 'pg.pl.plperl' => 'plperl.html', + 'pg.pl.plpgsql' => 'plpgsql.html', + 'pg.pl.plpython' => 'plpython.html', + 'pg.pl.pltcl' => 'pltcl.html', + + 'pg.privilege' => array('privileges.html','ddl-priv.html'), + 'pg.privilege.grant' => 'sql-grant.html', + 'pg.privilege.revoke' => 'sql-revoke.html', + + 'pg.process' => 'monitoring.html', + + 'pg.rule' => 'rules.html', + 'pg.rule.create' => 'sql-createrule.html', + 'pg.rule.drop' => 'sql-droprule.html', + + 'pg.schema' => 'ddl-schemas.html', + 'pg.schema.alter' => 'sql-alterschema.html', + 'pg.schema.create' => array( 'sql-createschema.html','ddl-schemas.html#DDL-SCHEMAS-CREATE'), + 'pg.schema.drop' => 'sql-dropschema.html', + 'pg.schema.search_path' => 'ddl-schemas.html#DDL-SCHEMAS-PATH', + + 'pg.sequence' => 'functions-sequence.html', + 'pg.sequence.alter' => 'sql-altersequence.html', + 'pg.sequence.create' => 'sql-createsequence.html', + 'pg.sequence.drop' => 'sql-dropsequence.html', + + 'pg.sql' => array('sql.html','sql-commands.html'), + 'pg.sql.insert' => 'sql-insert.html', + 'pg.sql.select' => 'sql-select.html', + 'pg.sql.update' => 'sql-update.html', + + 'pg.table' => 'ddl.html#DDL-BASICS', + 'pg.table.alter' => 'sql-altertable.html', + 'pg.table.create' => 'sql-createtable.html', + 'pg.table.drop' => 'sql-droptable.html', + 'pg.table.empty' => 'sql-truncate.html', + + 'pg.tablespace' => 'manage-ag-tablespaces.html', + 'pg.tablespace.alter' => 'sql-altertablespace.html', + 'pg.tablespace.create' => 'sql-createtablespace.html', + 'pg.tablespace.drop' => 'sql-droptablespace.html', + + 'pg.trigger' => 'triggers.html', + 'pg.trigger.alter' => 'sql-altertrigger.html', + 'pg.trigger.create' => 'sql-createtrigger.html', + 'pg.trigger.drop' => 'sql-droptrigger.html', + + 'pg.type' => array('xtypes.html','datatype.html','extend-type-system.html'), + 'pg.type.alter' => 'sql-altertype.html', + 'pg.type.create' => 'sql-createtype.html', + 'pg.type.drop' => 'sql-droptype.html', + + 'pg.user.alter' => array('sql-alteruser.html','user-attributes.html'), + 'pg.user.create' => array('sql-createuser.html','user-manag.html#DATABASE-USERS'), + 'pg.user.drop' => array('sql-dropuser.html','user-manag.html#DATABASE-USERS'), + + 'pg.variable' => 'runtime-config.html', + + 'pg.view' => 'tutorial-views.html', + 'pg.view.alter' => array('sql-createview.html','sql-altertable.html'), + 'pg.view.create' => 'sql-createview.html', + 'pg.view.drop' => 'sql-dropview.html', + + 'pg.aggregate' => array('xaggr.html', 'tutorial-agg.html', 'functions-aggregate.html', 'sql-expressions.html#SYNTAX-AGGREGATES'), + 'pg.aggregate.create' => 'sql-createaggregate.html', + 'pg.aggregate.drop' => 'sql-dropaggregate.html', + 'pg.aggregate.alter' => 'sql-alteraggregate.html', + + 'pg.server' => 'admin.html', + + 'pg.user' => 'user-manag.html', + + 'pg.locks' => 'view-pg-locks.html' +); + ?> diff --git a/libraries/lib.inc.php b/libraries/lib.inc.php index 3c17ed5a..4561348c 100644 --- a/libraries/lib.inc.php +++ b/libraries/lib.inc.php @@ -20,7 +20,7 @@ $appVersion = '5.0-dev'; // PostgreSQL and PHP minimum version - $postgresqlMinVer = '7.3'; + $postgresqlMinVer = '7.4'; $phpMinVer = '5.0'; // Check the version of PHP |