Add support for Postgres 13,14dev
authorRobert Treat <rob@xzilla.net>
Mon, 5 Oct 2020 04:30:05 +0000 (00:30 -0400)
committerRobert Treat <xzilla@users.noreply.github.com>
Wed, 7 Oct 2020 00:57:22 +0000 (20:57 -0400)
classes/database/Connection.php
classes/database/Postgres.php
classes/database/Postgres12.php [new file with mode: 0644]
classes/database/Postgres13.php [new file with mode: 0644]

index 4e0695b0653ac214a9d9e4cf17664a9472bec34b..f7b44f41758333737d03dbbb47bf354c9e0c1078 100644 (file)
@@ -76,9 +76,11 @@ class Connection {
 
                // Detect version and choose appropriate database driver
         switch (substr($version,0,2)) {
-            case '10': return 'Postgres10';break;
+            case '14': return 'Postgres';break;
+            case '13': return 'Postgres13';break;
+            case '12': return 'Postgres12';break;
             case '11': return 'Postgres11';break;
-            case '12': return 'Postgres';break;
+            case '10': return 'Postgres10';break;
         }    
 
                switch (substr($version,0,3)) {
index b780e0add998d6b055b6f2945018266ae05f08f9..6fab3bd7382e746be99848526b53b4330eaac8b7 100644 (file)
@@ -11,7 +11,7 @@ include_once('./classes/database/ADODB_base.php');
 
 class Postgres extends ADODB_base {
 
-       var $major_version = 12;
+       var $major_version = 14;
        // Max object name length
        var $_maxNameLen = 63;
        // Store the current schema
diff --git a/classes/database/Postgres12.php b/classes/database/Postgres12.php
new file mode 100644 (file)
index 0000000..f5c8028
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * PostgreSQL 12 support
+ *
+ */
+
+include_once('./classes/database/Postgres13.php');
+
+class Postgres12 extends Postgres13 {
+
+       var $major_version = 12;
+
+       /**
+        * Constructor
+        * @param $conn The database connection
+        */
+       function __construct($conn) {
+               parent::__construct($conn);
+       }
+
+       // Help functions
+
+       function getHelpPages() {
+               include_once('./help/PostgresDoc12.php');
+               return $this->help_page;
+       }
+
+
+       // Capabilities
+
+}
+?>
diff --git a/classes/database/Postgres13.php b/classes/database/Postgres13.php
new file mode 100644 (file)
index 0000000..a0b8c90
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * PostgreSQL 13 support
+ *
+ */
+
+include_once('./classes/database/Postgres.php');
+
+class Postgres13 extends Postgres {
+
+       var $major_version = 13;
+
+       /**
+        * Constructor
+        * @param $conn The database connection
+        */
+       function __construct($conn) {
+               parent::__construct($conn);
+       }
+
+       // Help functions
+
+       function getHelpPages() {
+               include_once('./help/PostgresDoc13.php');
+               return $this->help_page;
+       }
+
+
+       // Capabilities
+
+}
+?>