Add initial minimal support for pg 8.4
authorGuillaume (ioguix) de Rorthais <ioguix@free.fr>
Wed, 19 Nov 2008 03:23:16 +0000 (22:23 -0500)
committerGuillaume (ioguix) de Rorthais <ioguix@free.fr>
Wed, 19 Nov 2008 03:23:16 +0000 (22:23 -0500)
classes/database/Connection.php
classes/database/Postgres.php
classes/database/Postgres82.php
classes/database/Postgres83.php [new file with mode: 0644]
help/PostgresDoc84.php [new file with mode: 0644]

index a0a00dff6b91533a5fddb304a9743c88fed5aa6d..e90063206ec24dc14f647dc11753a7f4070fff99 100755 (executable)
@@ -80,7 +80,8 @@ class Connection {
 
                // 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':
index 6c9b996c792147947363369e56d64c5446963290..2612828f3ca913b00db27b9e2c0481573cfd7e98 100755 (executable)
@@ -11,7 +11,7 @@ include_once('./classes/database/ADODB_base.php');
 
 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 @@ class Postgres extends ADODB_base {
        }
 
        function getHelpPages() {
-               include_once('./help/PostgresDoc83.php');
+               include_once('./help/PostgresDoc84.php');
                return $this->help_page;
        }
 
index c30bfdd1aa7e4baabe7d998be29f0bca2c899f15..b4eb0b77dcad5f3650ec68828dc089c6610ab865 100644 (file)
@@ -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 (file)
index 0000000..49f704c
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * PostgreSQL 8.2 support
+ *
+ * $Id: Postgres82.php,v 1.10 2007/12/28 16:21:25 ioguix Exp $
+ */
+
+include_once('./classes/database/Postgres.php');
+
+class Postgres83 extends Postgres {
+
+       var $major_version = 8.3;
+
+       /**
+        * Constructor
+        * @param $conn The database connection
+        */
+       function Postgres83($conn) {
+               $this->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 (file)
index 0000000..91c8b20
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * Help links for PostgreSQL 8.4 documentation
+ *
+ * $Id: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ */
+
+include('./help/PostgresDoc83.php');
+
+$this->help_base = sprintf($GLOBALS['conf']['help_base'], '8.4');
+
+?>