From 8bbb3d607c7969d2481648d804a12c5389fd1124 Mon Sep 17 00:00:00 2001 From: "Guillaume (ioguix) de Rorthais" Date: Tue, 18 Nov 2008 22:23:16 -0500 Subject: [PATCH] Add initial minimal support for pg 8.4 --- classes/database/Connection.php | 3 ++- classes/database/Postgres.php | 4 ++-- classes/database/Postgres82.php | 4 ++-- classes/database/Postgres83.php | 31 +++++++++++++++++++++++++++++++ help/PostgresDoc84.php | 13 +++++++++++++ 5 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 classes/database/Postgres83.php create mode 100644 help/PostgresDoc84.php diff --git a/classes/database/Connection.php b/classes/database/Connection.php index a0a00dff6..e90063206 100755 --- a/classes/database/Connection.php +++ b/classes/database/Connection.php @@ -80,7 +80,8 @@ function getDriver(&$description) { // Detect version and choose appropriate database driver switch (substr($version,0,3)) { - case '8.3': return 'Postgres'; break; + case '8.4': return 'Postgres'; break; + case '8.3': return 'Postgres83'; break; case '8.2': return 'Postgres82'; break; case '8.1': return 'Postgres81'; break; case '8.0': diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 6c9b996c7..2612828f3 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -11,7 +11,7 @@ class Postgres extends ADODB_base { - var $major_version = 8.3; + var $major_version = 8.4; // Max object name length var $_maxNameLen = 63; // Store the current schema @@ -424,7 +424,7 @@ function getHelp($help) { } function getHelpPages() { - include_once('./help/PostgresDoc83.php'); + include_once('./help/PostgresDoc84.php'); return $this->help_page; } diff --git a/classes/database/Postgres82.php b/classes/database/Postgres82.php index c30bfdd1a..b4eb0b77d 100644 --- a/classes/database/Postgres82.php +++ b/classes/database/Postgres82.php @@ -6,9 +6,9 @@ * $Id: Postgres82.php,v 1.10 2007/12/28 16:21:25 ioguix Exp $ */ -include_once('./classes/database/Postgres.php'); +include_once('./classes/database/Postgres83.php'); -class Postgres82 extends Postgres { +class Postgres82 extends Postgres83 { var $major_version = 8.2; diff --git a/classes/database/Postgres83.php b/classes/database/Postgres83.php new file mode 100644 index 000000000..49f704c9a --- /dev/null +++ b/classes/database/Postgres83.php @@ -0,0 +1,31 @@ +Postgres($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc83.php'); + return $this->help_page; + } +} + +?> diff --git a/help/PostgresDoc84.php b/help/PostgresDoc84.php new file mode 100644 index 000000000..91c8b2045 --- /dev/null +++ b/help/PostgresDoc84.php @@ -0,0 +1,13 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '8.4'); + +?>