Explicit Support for PG 9.4
authorRobert Treat <rob@xzilla.net>
Sun, 1 Feb 2015 19:38:01 +0000 (14:38 -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/Postgres92.php
classes/database/Postgres93.php [new file with mode: 0644]

index a8e81b54e3ad3ba6414f6768341ebd91871c842d..3a3e3d058724b41bfe8091a0320b884dc54fe56e 100755 (executable)
@@ -76,7 +76,8 @@ class Connection {
 
                // Detect version and choose appropriate database driver
                switch (substr($version,0,3)) {
-                       case '9.3': return 'Postgres'; break;
+                       case '9.4': return 'Postgres'; break;
+                       case '9.3': return 'Postgres93'; break;
                        case '9.2': return 'Postgres92'; break;
                        case '9.1': return 'Postgres91'; break;
                        case '9.0': return 'Postgres90'; break;
index b31bc03672a70708804a1391e6757ffcc12b50fc..d01906bfe571761fcfca9b78de65ba1b22692003 100755 (executable)
@@ -11,7 +11,7 @@ include_once('./classes/database/ADODB_base.php');
 
 class Postgres extends ADODB_base {
 
-       var $major_version = 9.3;
+       var $major_version = 9.4;
        // 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/PostgresDoc93.php');
+               include_once('./help/PostgresDoc94.php');
                return $this->help_page;
        }
 
index b67bfe07b8ebc7fb48106d2fa969b24922441291..d20b188abfbddedfa04f7459605b66aaaa7f0ce5 100644 (file)
@@ -5,9 +5,9 @@
  *
  */
 
-include_once('./classes/database/Postgres.php');
+include_once('./classes/database/Postgres93.php');
 
-class Postgres92 extends Postgres {
+class Postgres92 extends Postgres93 {
 
        var $major_version = 9.2;
 
diff --git a/classes/database/Postgres93.php b/classes/database/Postgres93.php
new file mode 100644 (file)
index 0000000..bcf7e41
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * PostgreSQL 9.3 support
+ *
+ */
+
+include_once('./classes/database/Postgres.php');
+
+class Postgres93 extends Postgres {
+
+       var $major_version = 9.3;
+
+       /**
+        * Constructor
+        * @param $conn The database connection
+        */
+       function Postgres93($conn) {
+               $this->Postgres($conn);
+       }
+
+       // Help functions
+
+       function getHelpPages() {
+               include_once('./help/PostgresDoc93.php');
+               return $this->help_page;
+       }
+
+}
+?>