From bd5402abc9e85cb70a5cdeb09f2dfa2c40daff3a Mon Sep 17 00:00:00 2001 From: Robert Treat Date: Fri, 1 Jan 2010 23:25:57 -0500 Subject: [PATCH] basic support for Postgres 8.5 --- classes/database/Postgres.php | 4 +-- classes/database/Postgres84.php | 51 +++++++++++++++++++++++++++++++++ help/PostgresDoc85.php | 13 +++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100755 classes/database/Postgres84.php create mode 100644 help/PostgresDoc85.php diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 8876406d..c6484211 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -11,7 +11,7 @@ include_once('./classes/database/ADODB_base.php'); class Postgres extends ADODB_base { - var $major_version = 8.4; + var $major_version = 8.5; // Max object name length var $_maxNameLen = 63; // Store the current schema @@ -427,7 +427,7 @@ class Postgres extends ADODB_base { } function getHelpPages() { - include_once('./help/PostgresDoc84.php'); + include_once('./help/PostgresDoc85.php'); return $this->help_page; } diff --git a/classes/database/Postgres84.php b/classes/database/Postgres84.php new file mode 100755 index 00000000..00a647fe --- /dev/null +++ b/classes/database/Postgres84.php @@ -0,0 +1,51 @@ + array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'view' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'sequence' => array('SELECT', 'UPDATE', 'ALL PRIVILEGES'), + 'database' => array('CREATE', 'TEMPORARY', 'CONNECT', 'ALL PRIVILEGES'), + 'function' => array('EXECUTE', 'ALL PRIVILEGES'), + 'language' => array('USAGE', 'ALL PRIVILEGES'), + 'schema' => array('CREATE', 'USAGE', 'ALL PRIVILEGES'), + 'tablespace' => array('CREATE', 'ALL PRIVILEGES'), + 'column' => array('SELECT', 'INSERT', 'UPDATE', 'REFERENCES','ALL PRIVILEGES') + ); + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres84($conn) { + $this->Postgres($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc84.php'); + return $this->help_page; + } + + // Databse functions + + + // Capabilities + +} + +?> diff --git a/help/PostgresDoc85.php b/help/PostgresDoc85.php new file mode 100644 index 00000000..19190e70 --- /dev/null +++ b/help/PostgresDoc85.php @@ -0,0 +1,13 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '8.5'); + +?> -- 2.39.5