summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Treat2020-10-05 04:30:05 +0000
committerRobert Treat2020-10-07 00:57:22 +0000
commit53f1bb2c48a3b41f48121b5ad9b0833fabb9b6cf (patch)
tree8b1e2dc47cbcc90b669168b326e6fd8f1ecdd8b3
parent46944bf9bff6642eb8eb26d4fceb211a65deede3 (diff)
Add support for Postgres 13,14dev
-rw-r--r--classes/database/Connection.php6
-rw-r--r--classes/database/Postgres.php2
-rw-r--r--classes/database/Postgres12.php33
-rw-r--r--classes/database/Postgres13.php33
4 files changed, 71 insertions, 3 deletions
diff --git a/classes/database/Connection.php b/classes/database/Connection.php
index 4e0695b0..f7b44f41 100644
--- a/classes/database/Connection.php
+++ b/classes/database/Connection.php
@@ -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)) {
diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php
index b780e0ad..6fab3bd7 100644
--- a/classes/database/Postgres.php
+++ b/classes/database/Postgres.php
@@ -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
index 00000000..f5c80280
--- /dev/null
+++ b/classes/database/Postgres12.php
@@ -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
index 00000000..a0b8c90b
--- /dev/null
+++ b/classes/database/Postgres13.php
@@ -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
+
+}
+?>