diff options
author | Robert Treat | 2012-05-29 02:29:30 +0000 |
---|---|---|
committer | Robert Treat | 2012-05-29 02:29:30 +0000 |
commit | 46cfafa86509f2fd4284f45c2a5cf4707a3ce0f6 (patch) | |
tree | 865b94ba438ef53ba4454c05b1a7c294650a2f60 /classes/database | |
parent | 0b7de9a025c84ec9c184ce0d8f91a0d8eef08861 (diff) |
Intermediate support for Postgres 90/91
Diffstat (limited to 'classes/database')
-rwxr-xr-x | classes/database/Connection.php | 6 | ||||
-rwxr-xr-x | classes/database/Postgres.php | 4 | ||||
-rwxr-xr-x | classes/database/Postgres90.php | 33 |
3 files changed, 39 insertions, 4 deletions
diff --git a/classes/database/Connection.php b/classes/database/Connection.php index 16b2abc7..6733e535 100755 --- a/classes/database/Connection.php +++ b/classes/database/Connection.php @@ -76,7 +76,9 @@ class Connection { // Detect version and choose appropriate database driver switch (substr($version,0,3)) { - case '8.4': return 'Postgres'; break; + case '9.1': return 'Postgres'; break; + case '9.0': return 'Postgres90'; break; + case '8.4': return 'Postgres84'; break; case '8.3': return 'Postgres83'; break; case '8.2': return 'Postgres82'; break; case '8.1': return 'Postgres81'; break; @@ -86,7 +88,7 @@ class Connection { } /* All <7.4 versions are not supported */ - // if major version is 7 or less and wasn't catch in the + // if major version is 7 or less and wasn't cought in the // switch/case block, we have an unsupported version. if ((int)substr($version, 0, 1) < 8) return null; diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index d2c00603..bd7e3f29 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 = 9.0; + var $major_version = 9.1; // Max object name length var $_maxNameLen = 63; // Store the current schema @@ -415,7 +415,7 @@ class Postgres extends ADODB_base { } function getHelpPages() { - include_once('./help/PostgresDoc90.php'); + include_once('./help/PostgresDoc91.php'); return $this->help_page; } diff --git a/classes/database/Postgres90.php b/classes/database/Postgres90.php new file mode 100755 index 00000000..3f48d30a --- /dev/null +++ b/classes/database/Postgres90.php @@ -0,0 +1,33 @@ +<?php + +/** + * PostgreSQL 9.0 support + * + * $Id: Postgres82.php,v 1.10 2007/12/28 16:21:25 ioguix Exp $ + */ + +include_once('./classes/database/Postgres.php'); + +class Postgres90 extends Postgres { + + var $major_version = 9.0; + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres90($conn) { + $this->Postgres($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc90.php'); + return $this->help_page; + } + + // Capabilities + +} +?> |