basic support for Postgres 8.5
authorRobert Treat <robert@robert-treats-macbook.local>
Sat, 2 Jan 2010 04:25:57 +0000 (23:25 -0500)
committerRobert Treat <robert@robert-treats-macbook.local>
Sat, 2 Jan 2010 04:25:57 +0000 (23:25 -0500)
classes/database/Postgres.php
classes/database/Postgres84.php [new file with mode: 0755]
help/PostgresDoc85.php [new file with mode: 0644]

index 8876406dd1875f7250e0eab3b913bebdfdaaea58..c6484211a9a17180c5868a7599b7430229f44073 100755 (executable)
@@ -11,7 +11,7 @@ include_once('./classes/database/ADODB_base.php');
 
 class Postgres extends ADODB_base {
 
-       var $major_version = 8.4;
+       var $major_version = 8.5;
        // Max object name length
        var $_maxNameLen = 63;
        // Store the current schema
@@ -427,7 +427,7 @@ class Postgres extends ADODB_base {
        }
 
        function getHelpPages() {
-               include_once('./help/PostgresDoc84.php');
+               include_once('./help/PostgresDoc85.php');
                return $this->help_page;
        }
 
diff --git a/classes/database/Postgres84.php b/classes/database/Postgres84.php
new file mode 100755 (executable)
index 0000000..00a647f
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * PostgreSQL 8.4 support
+ *
+ * $Id: Postgres82.php,v 1.10 2007/12/28 16:21:25 ioguix Exp $
+ */
+
+include_once('./classes/database/Postgres.php');
+
+class Postgres84 extends Postgres {
+
+       var $major_version = 8.4;
+
+       // List of all legal privileges that can be applied to different types
+       // of objects.
+       var $privlist = array(
+               'table' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'),
+               'view' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'),
+               'sequence' => array('SELECT', 'UPDATE', 'ALL PRIVILEGES'),
+               'database' => array('CREATE', 'TEMPORARY', 'CONNECT', 'ALL PRIVILEGES'),
+               'function' => array('EXECUTE', 'ALL PRIVILEGES'),
+               'language' => array('USAGE', 'ALL PRIVILEGES'),
+               'schema' => array('CREATE', 'USAGE', 'ALL PRIVILEGES'),
+               'tablespace' => array('CREATE', 'ALL PRIVILEGES'),
+               'column' => array('SELECT', 'INSERT', 'UPDATE', 'REFERENCES','ALL PRIVILEGES')
+       );
+
+       /**
+        * Constructor
+        * @param $conn The database connection
+        */
+       function Postgres84($conn) {
+               $this->Postgres($conn);
+       }
+
+       // Help functions
+
+       function getHelpPages() {
+               include_once('./help/PostgresDoc84.php');
+               return $this->help_page;
+       }
+
+       // Databse functions
+
+
+       // Capabilities
+
+}
+
+?>
diff --git a/help/PostgresDoc85.php b/help/PostgresDoc85.php
new file mode 100644 (file)
index 0000000..19190e7
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * Help links for PostgreSQL 8.4 documentation
+ *
+ * $Id: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ */
+
+include('./help/PostgresDoc84.php');
+
+$this->help_base = sprintf($GLOBALS['conf']['help_base'], '8.5');
+
+?>