Explicit Support for PG 9.5
authorJohn K. Harvey <john.harvey@crunchydata.com>
Mon, 29 Feb 2016 17:39:50 +0000 (12:39 -0500)
committerRobert Treat <robert@omniti.com>
Mon, 30 Oct 2017 22:31:50 +0000 (18:31 -0400)
classes/database/Connection.php
classes/database/Postgres.php
classes/database/Postgres93.php
classes/database/Postgres94.php [new file with mode: 0644]
help/PostgresDoc95.php [new file with mode: 0644]

index 3a3e3d058724b41bfe8091a0320b884dc54fe56e..f20b47fa347e044c6920942e34621e106dc8279f 100755 (executable)
@@ -76,7 +76,8 @@ class Connection {
 
                // Detect version and choose appropriate database driver
                switch (substr($version,0,3)) {
-                       case '9.4': return 'Postgres'; break;
+                        case '9.5': return 'Postgres'; break;
+                       case '9.4': return 'Postgres94'; break;
                        case '9.3': return 'Postgres93'; break;
                        case '9.2': return 'Postgres92'; break;
                        case '9.1': return 'Postgres91'; break;
index d01906bfe571761fcfca9b78de65ba1b22692003..7b3b8f530b0e519441dae23b33717c262be243f5 100755 (executable)
@@ -11,7 +11,7 @@ include_once('./classes/database/ADODB_base.php');
 
 class Postgres extends ADODB_base {
 
-       var $major_version = 9.4;
+       var $major_version = 9.5;
        // Max object name length
        var $_maxNameLen = 63;
        // Store the current schema
@@ -419,7 +419,7 @@ class Postgres extends ADODB_base {
        }
 
        function getHelpPages() {
-               include_once('./help/PostgresDoc94.php');
+               include_once('./help/PostgresDoc95.php');
                return $this->help_page;
        }
 
index bcf7e411aa3121d1e7264c1941916d180d75893c..24ee22d6064434f7952be345c822f9247c8e0af8 100644 (file)
@@ -5,9 +5,9 @@
  *
  */
 
-include_once('./classes/database/Postgres.php');
+include_once('./classes/database/Postgres94.php');
 
-class Postgres93 extends Postgres {
+class Postgres93 extends Postgres94 {
 
        var $major_version = 9.3;
 
diff --git a/classes/database/Postgres94.php b/classes/database/Postgres94.php
new file mode 100644 (file)
index 0000000..619b238
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * PostgreSQL 9.4 support
+ *
+ */
+
+include_once('./classes/database/Postgres.php');
+
+class Postgres94 extends Postgres {
+
+       var $major_version = 9.4;
+
+       /**
+        * Constructor
+        * @param $conn The database connection
+        */
+       function Postgres94($conn) {
+               $this->Postgres($conn);
+       }
+
+       // Help functions
+
+       function getHelpPages() {
+               include_once('./help/PostgresDoc94.php');
+               return $this->help_page;
+       }
+
+}
+?>
diff --git a/help/PostgresDoc95.php b/help/PostgresDoc95.php
new file mode 100644 (file)
index 0000000..5ef261a
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * Help links for PostgreSQL 9.5 documentation
+ *
+ * $Id: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ */
+
+include('./help/PostgresDoc94.php');
+
+$this->help_base = sprintf($GLOBALS['conf']['help_base'], '9.5');
+
+?>