* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres73.php,v 1.127 2004/07/13 16:33:36 jollytoad Exp $
+ * $Id: Postgres73.php,v 1.128 2004/07/14 10:24:26 jollytoad Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
elseif (sizeof($paths) == 0) return -2;
$this->fieldArrayClean($paths);
- $sql = 'SET SEARCH_PATH TO "' . implode('","', $paths) . '", pg_catalog';
+ $sql = 'SET SEARCH_PATH TO "' . implode('","', $paths) . '"';
return $this->execute($sql);
}
+
+ /**
+ * Return the default schema search path
+ */
+ function getSearchPath() {
+ $sql = 'SHOW search_path';
+ return $this->selectField($sql, 'search_path');
+ }
/**
* Return all schemas in the current database
/**
* Alternative SQL editing window
*
- * $Id: sqledit.php,v 1.18 2004/07/13 15:24:41 jollytoad Exp $
+ * $Id: sqledit.php,v 1.19 2004/07/14 10:24:26 jollytoad Exp $
*/
// Include application functions
if ($data->hasSchemas()) {
if (!isset($_REQUEST['search_path']))
- $_REQUEST['search_path'] = '$user, public'; // Should this be retrieved from a $data function?
+ $_REQUEST['search_path'] = $data->getSearchPath();
echo "\n<label>{$lang['strsearchpath']}: <input type=\"text\" name=\"search_path\" size=\"30\" value=\"",
htmlspecialchars($_REQUEST['search_path']), "\" /></label>";