* Boolean default values and general boolean field handling fixes
* Support zero column tables
* Correctly display the contents of bytea fields
+* Consider information_schema to be a system object
Version 3.0
-----------
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres73.php,v 1.57 2003/08/06 02:09:25 chriskl Exp $
+ * $Id: Postgres73.php,v 1.58 2003/08/12 01:33:56 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
// Max object name length
var $_maxNameLen = 63;
- // System schema ids and names
- var $_schemaOIDs = array(11, 99);
- var $_schemaNames = array('pg_catalog', 'pg_toast');
-
// List of all legal privileges that can be applied to different types
// of objects.
var $privlist = array(
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres74.php,v 1.10 2003/08/11 05:48:04 chriskl Exp $
+ * $Id: Postgres74.php,v 1.11 2003/08/12 01:33:56 chriskl Exp $
*/
include_once('classes/database/Postgres73.php');
// Max object name length
var $_maxNameLen = 63;
- // System schema ids and names
- var $_schemaOIDs = array(11, 99);
- var $_schemaNames = array('pg_catalog', 'pg_toast');
-
/**
* Constructor
* @param $host The hostname to connect to
ORDER BY s.usename";
return $this->selectSet($sql);
- }
+ }
+
+ // Schema functions
+
+ /**
+ * Return all schemas in the current database. This differs from the version
+ * in 7.3 only in that it considers the information_schema to be a system schema.
+ * @return All schemas, sorted alphabetically
+ */
+ function &getSchemas() {
+ global $conf;
+
+ if (!$conf['show_system']) $and = "AND nspname NOT LIKE 'pg_%' AND nspname != 'information_schema'";
+ else $and = '';
+ $sql = "SELECT pn.nspname, pu.usename AS nspowner FROM pg_catalog.pg_namespace pn, pg_catalog.pg_user pu
+ WHERE pn.nspowner = pu.usesysid
+ {$and}ORDER BY nspname";
+
+ return $this->selectSet($sql);
+ }
// View functions