summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchriskl2005-03-15 02:44:10 +0000
committerchriskl2005-03-15 02:44:10 +0000
commite52dbdd993ef7edfb11291b32a9e0273eae6c373 (patch)
tree94e88ef5d506fae17bbf9e4a014ad0a7d31e5386
parent2fd6396c213207ac55e472d8a9c953d956fc6709 (diff)
add rudimentary support for 8.1devel
-rw-r--r--HISTORY1
-rwxr-xr-xclasses/database/Connection.php6
-rw-r--r--classes/database/Postgres81.php73
-rw-r--r--help/PostgresDoc81.php13
4 files changed, 91 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 7d72a3e4..f0cb29e9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -10,6 +10,7 @@ Features
* Allow variable size textarea when editing values (Juergen Weigert)
* Allow SQL script upload to parse arbitrary SQL, including multiline
SQL statements
+* Add support for PostgreSQL 8.1devel
Bugs
* Tree Icons are displayed middle instead of top
diff --git a/classes/database/Connection.php b/classes/database/Connection.php
index 60f1a470..71b9faf5 100755
--- a/classes/database/Connection.php
+++ b/classes/database/Connection.php
@@ -3,7 +3,7 @@
/**
* Class to represent a database connection
*
- * $Id: Connection.php,v 1.8 2005/02/06 04:18:58 mr-russ Exp $
+ * $Id: Connection.php,v 1.9 2005/03/15 02:44:10 chriskl Exp $
*/
include_once('./classes/database/ADODB_base.php');
@@ -65,6 +65,8 @@ class Connection {
// it won't work with those versions.
if ((int)substr($version, 0, 1) < 7)
return null;
+ elseif (strpos($version, '8.0') === 0 || strpos($version, '7.5') === 0)
+ return 'Postgres80';
elseif (strpos($version, '7.4') === 0)
return 'Postgres74';
elseif (strpos($version, '7.3') === 0)
@@ -76,7 +78,7 @@ class Connection {
elseif (strpos($version, '7.0') === 0)
return 'Postgres';
else
- return 'Postgres80';
+ return 'Postgres81';
}
/**
diff --git a/classes/database/Postgres81.php b/classes/database/Postgres81.php
new file mode 100644
index 00000000..26daa7e2
--- /dev/null
+++ b/classes/database/Postgres81.php
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * PostgreSQL 8.1 support
+ *
+ * $Id: Postgres81.php,v 1.1 2005/03/15 02:44:10 chriskl Exp $
+ */
+
+include_once('./classes/database/Postgres80.php');
+
+class Postgres81 extends Postgres80 {
+
+ // Map of database encoding names to HTTP encoding names. If a
+ // database encoding does not appear in this list, then its HTTP
+ // encoding name is the same as its database encoding name.
+ var $codemap = array(
+ 'BIG5' => 'BIG5',
+ 'EUC_CN' => 'GB2312',
+ 'EUC_JP' => 'EUC-JP',
+ 'EUC_KR' => 'EUC-KR',
+ 'EUC_TW' => 'EUC-TW',
+ 'GB18030' => 'GB18030',
+ 'GBK' => 'GB2312',
+ 'ISO_8859_5' => 'ISO-8859-5',
+ 'ISO_8859_6' => 'ISO-8859-6',
+ 'ISO_8859_7' => 'ISO-8859-7',
+ 'ISO_8859_8' => 'ISO-8859-8',
+ 'JOHAB' => 'CP1361',
+ 'KOI8' => 'KOI8-R',
+ 'LATIN1' => 'ISO-8859-1',
+ 'LATIN2' => 'ISO-8859-2',
+ 'LATIN3' => 'ISO-8859-3',
+ 'LATIN4' => 'ISO-8859-4',
+ 'LATIN5' => 'ISO-8859-9',
+ 'LATIN6' => 'ISO-8859-10',
+ 'LATIN7' => 'ISO-8859-13',
+ 'LATIN8' => 'ISO-8859-14',
+ 'LATIN9' => 'ISO-8859-15',
+ 'LATIN10' => 'ISO-8859-16',
+ 'SJIS' => 'SHIFT_JIS',
+ 'SQL_ASCII' => 'US-ASCII',
+ 'UHC' => 'WIN949',
+ 'UTF8' => 'UTF-8',
+ 'WIN866' => 'CP866',
+ 'WIN874' => 'CP874',
+ 'WIN1250' => 'CP1250',
+ 'WIN1251' => 'CP1251',
+ 'WIN1252' => 'CP1252',
+ 'WIN1256' => 'CP1256',
+ 'WIN1258' => 'CP1258'
+ );
+
+ // Last oid assigned to a system object
+ var $_lastSystemOID = 17231;
+
+ /**
+ * Constructor
+ * @param $conn The database connection
+ */
+ function Postgres81($conn) {
+ $this->Postgres80($conn);
+ }
+
+ // Help functions
+
+ function &getHelpPages() {
+ include_once('./help/PostgresDoc81.php');
+ return $this->help_page;
+ }
+
+}
+
+?>
diff --git a/help/PostgresDoc81.php b/help/PostgresDoc81.php
new file mode 100644
index 00000000..bcd6d65e
--- /dev/null
+++ b/help/PostgresDoc81.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * Help links for PostgreSQL 8.1 documentation
+ *
+ * $Id: PostgresDoc81.php,v 1.1 2005/03/15 02:44:11 chriskl Exp $
+ */
+
+include('./help/PostgresDoc80.php');
+
+$this->help_base = sprintf($GLOBALS['conf']['help_base'], '8.1');
+
+?>