* Tablespace support for 7.5
* Support cancelling and killing backend processes in 7.5
* Allow setting privileges on databases
+* Allow setting schema search path in SQL window
+* Allow filtering find results by object type
+* Show function arguments in find results
Translations
* Arabic from Zaki
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.232 2004/07/10 09:23:24 chriskl Exp $
+ * $Id: Postgres.php,v 1.233 2004/07/12 07:13:32 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
* @param $startvalue The starting value
* @param $cachevalue The cache value
* @param $cycledvalue True if cycled, false otherwise
- * @param $tablespace The tablespace ('' means none/default)
* @return 0 success
*/
function createSequence($sequence, $increment, $minvalue, $maxvalue,
- $startvalue, $cachevalue, $cycledvalue, $tablespace) {
+ $startvalue, $cachevalue, $cycledvalue) {
$this->fieldClean($sequence);
$this->clean($increment);
$this->clean($minvalue);
if ($cachevalue != '') $sql .= " CACHE {$cachevalue}";
if ($cycledvalue) $sql .= " CYCLE";
- // Tablespace
- if ($this->hasTablespaces() && $tablespace != '') {
- $this->fieldClean($tablespace);
- $sql .= " TABLESPACE \"{$tablespace}\"";
- }
-
return $this->execute($sql);
}
/**
* Searches all system catalogs to find objects that match a certain name.
* @param $term The search term
+ * @param $filter The object type to restrict to ('' means no restriction)
* @return A recordset
*/
- function findObject($term) {
+ function findObject($term, $filter) {
global $conf;
// Escape search term for ~* match
$term = str_replace($v, "\\{$v}", $term);
}
$this->clean($term);
+ $this->clean($filter);
// Build SQL, excluding system relations as necessary
// Relations
+ $case_clause = "CASE WHEN relkind='r' THEN (CASE WHEN EXISTS (SELECT 1 FROM pg_rewrite r WHERE r.ev_class = pc.oid AND r.ev_type = '1') THEN 'VIEW'::VARCHAR ELSE 'TABLE'::VARCHAR END) WHEN relkind='v' THEN 'VIEW'::VARCHAR WHEN relkind='S' THEN 'SEQUENCE'::VARCHAR END";
$sql = "
- SELECT CASE WHEN relkind='r' THEN (CASE WHEN EXISTS (SELECT 1 FROM pg_rewrite r WHERE r.ev_class = pc.oid AND r.ev_type = '1') THEN 'VIEW'::VARCHAR ELSE 'TABLE'::VARCHAR END) WHEN relkind='v' THEN 'VIEW'::VARCHAR WHEN relkind='S' THEN 'SEQUENCE'::VARCHAR END AS type,
+ SELECT {$case_clause} AS type,
pc.oid, NULL::VARCHAR AS schemaname, NULL::VARCHAR AS relname, pc.relname AS name FROM pg_class pc
WHERE relkind IN ('r', 'v', 'S') AND relname ~* '.*{$term}.*'";
- if (!$conf['show_system']) $sql .= " AND pc.relname NOT LIKE 'pg\\\\_%'";
+ if (!$conf['show_system']) $sql .= " AND pc.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter == 'TABLE' || $filter == 'VIEW' || $filter == 'SEQUENCE') $sql .= " AND {$case_clause} = '{$filter}'";
+ elseif ($filter != '') $sql .= " AND FALSE";
// Columns
$sql .= "
NULL, NULL, pc.relname, pa.attname FROM pg_class pc,
pg_attribute pa WHERE pc.oid=pa.attrelid
AND pa.attname ~* '.*{$term}.*' AND pa.attnum > 0 AND pc.relkind IN ('r', 'v')";
- if (!$conf['show_system']) $sql .= " AND pc.relname NOT LIKE 'pg\\\\_%'";
+ if (!$conf['show_system']) $sql .= " AND pc.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter != '' && $filter != 'COLUMNTABLE' || $filter != 'COLUMNVIEW') $sql .= " AND FALSE";
// Functions
$sql .= "
UNION ALL
- SELECT 'FUNCTION', pp.oid, NULL, NULL, pp.proname FROM pg_proc pp
+ SELECT 'FUNCTION', pp.oid, NULL, NULL, pp.proname || '(' || oidvectortypes(pp.proargtypes) || ')' FROM pg_proc pp
WHERE proname ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND pp.oid > '{$this->_lastSystemOID}'::oid";
+ if ($filter != '' && $filter != 'FUNCTION') $sql .= " AND FALSE";
// Indexes
$sql .= "
pg_index pi, pg_class pc2 WHERE pc.oid=pi.indrelid
AND pi.indexrelid=pc2.oid
AND pc2.relname ~* '.*{$term}.*' AND NOT pi.indisprimary AND NOT pi.indisunique";
- if (!$conf['show_system']) $sql .= " AND pc2.relname NOT LIKE 'pg\\\\_%'";
+ if (!$conf['show_system']) $sql .= " AND pc2.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter != '' && $filter != 'INDEX') $sql .= " AND FALSE";
// Check Constraints
$sql .= "
pg_relcheck pr WHERE pc.oid=pr.rcrelid
AND pr.rcname ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND pc.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter != '' && $filter != 'CONSTRAINT') $sql .= " AND FALSE";
+
// Unique and Primary Key Constraints
$sql .= "
UNION ALL
pg_index pi, pg_class pc2 WHERE pc.oid=pi.indrelid
AND pi.indexrelid=pc2.oid
AND pc2.relname ~* '.*{$term}.*' AND (pi.indisprimary OR pi.indisunique)";
- if (!$conf['show_system']) $sql .= " AND pc2.relname NOT LIKE 'pg\\\\_%'";
+ if (!$conf['show_system']) $sql .= " AND pc2.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter != '' && $filter != 'CONSTRAINT') $sql .= " AND FALSE";
// Triggers
$sql .= "
pg_trigger pt WHERE pc.oid=pt.tgrelid
AND pt.tgname ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND pc.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter != '' && $filter != 'TRIGGER') $sql .= " AND FALSE";
// Table Rules
$sql .= "
WHERE c.relkind='r' AND NOT EXISTS (SELECT 1 FROM pg_rewrite r WHERE r.ev_class = c.oid AND r.ev_type = '1')
AND r.rulename !~ '^_RET' AND c.oid = r.ev_class AND r.rulename ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND c.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter != '' && $filter != 'RULE') $sql .= " AND FALSE";
// View Rules
$sql .= "
WHERE c.relkind='r' AND EXISTS (SELECT 1 FROM pg_rewrite r WHERE r.ev_class = c.oid AND r.ev_type = '1')
AND r.rulename !~ '^_RET' AND c.oid = r.ev_class AND r.rulename ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND c.relname NOT LIKE 'pg\\\\_%'";
+ if ($filter != '' && $filter != 'RULE') $sql .= " AND FALSE";
// Advanced Objects
if ($conf['show_advanced']) {
SELECT 'TYPE', pt.oid, NULL, NULL, pt.typname FROM pg_type pt
WHERE typname ~* '.*{$term}.*' AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_class c WHERE c.oid = pt.typrelid))";
if (!$conf['show_system']) $sql .= " AND pt.oid > '{$this->_lastSystemOID}'::oid";
+ if ($filter != '' && $filter != 'TYPE') $sql .= " AND FALSE";
// Operators
$sql .= "
SELECT 'OPERATOR', po.oid, NULL, NULL, po.oprname FROM pg_operator po
WHERE oprname ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND po.oid > '{$this->_lastSystemOID}'::oid";
+ if ($filter != '' && $filter != 'OPERATOR') $sql .= " AND FALSE";
// Languages
$sql .= "
SELECT 'LANGUAGE', pl.oid, NULL, NULL, pl.lanname FROM pg_language pl
WHERE lanname ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND pl.lanispl";
+ if ($filter != '' && $filter != 'LANGUAGE') $sql .= " AND FALSE";
// Aggregates
$sql .= "
SELECT DISTINCT ON (a.aggname) 'AGGREGATE', a.oid, NULL, NULL, a.aggname FROM pg_aggregate a
WHERE aggname ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND a.oid > '{$this->_lastSystemOID}'::oid";
+ if ($filter != '' && $filter != 'AGGREGATE') $sql .= " AND FALSE";
// Op Classes
$sql .= "
SELECT DISTINCT ON (po.opcname) 'OPCLASS', po.oid, NULL, NULL, po.opcname FROM pg_opclass po
WHERE po.opcname ~* '.*{$term}.*'";
if (!$conf['show_system']) $sql .= " AND po.oid > '{$this->_lastSystemOID}'::oid";
+ if ($filter != '' && $filter != 'OPCLASS') $sql .= " AND FALSE";
}
$sql .= " ORDER BY type, schemaname, relname, name";
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres73.php,v 1.125 2004/07/10 08:51:01 chriskl Exp $
+ * $Id: Postgres73.php,v 1.126 2004/07/12 07:13:33 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
pc.oid AS prooid,
proname,
lanname as prolanguage,
- format_type(prorettype, NULL) as proresult,
+ pg_catalog.format_type(prorettype, NULL) as proresult,
prosrc,
probin,
proretset,
proisstrict,
provolatile,
prosecdef,
- oidvectortypes(pc.proargtypes) AS proarguments,
+ pg_catalog.oidvectortypes(pc.proargtypes) AS proarguments,
pg_catalog.obj_description(pc.oid, 'pg_proc') AS procomment
FROM
pg_catalog.pg_proc pc, pg_catalog.pg_language pl
/**
* Searches all system catalogs to find objects that match a certain name.
* @param $term The search term
+ * @param $filter The object type to restrict to ('' means no restriction)
* @return A recordset
*/
- function findObject($term) {
+ function findObject($term, $filter) {
global $conf;
// Escape search term for ILIKE match
$term = str_replace('_', '\\_', $term);
$term = str_replace('%', '\\%', $term);
$this->clean($term);
+ $this->clean($filter);
// Exclude system relations if necessary
if (!$conf['show_system']) {
$lan_where = '';
}
- $sql = "
+ // Apply outer filter
+ $sql = '';
+ if ($filter != '') {
+ $sql = "SELECT * FROM (";
+ }
+
+ $sql .= "
SELECT 'SCHEMA' AS type, oid, NULL AS schemaname, NULL AS relname, nspname AS name
FROM pg_catalog.pg_namespace pn WHERE nspname ILIKE '%{$term}%' {$where}
UNION ALL
pg_catalog.pg_attribute pa WHERE pc.relnamespace=pn.oid AND pc.oid=pa.attrelid
AND pa.attname ILIKE '%{$term}%' AND pa.attnum > 0 AND NOT pa.attisdropped AND pc.relkind IN ('r', 'v') {$where}
UNION ALL
- SELECT 'FUNCTION', pp.oid, pn.nspname, NULL, pp.proname FROM pg_catalog.pg_proc pp, pg_catalog.pg_namespace pn
+ SELECT 'FUNCTION', pp.oid, pn.nspname, NULL, pp.proname || '(' || pg_catalog.oidvectortypes(pp.proargtypes) || ')' FROM pg_catalog.pg_proc pp, pg_catalog.pg_namespace pn
WHERE pp.pronamespace=pn.oid AND NOT pp.proisagg AND pp.proname ILIKE '%{$term}%' {$where}
UNION ALL
SELECT 'INDEX', NULL, pn.nspname, pc.relname, pc2.relname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn,
";
}
+ if ($filter != '') {
+ // We use like to make RULE, CONSTRAINT and COLUMN searches work
+ $sql .= ") AS sub WHERE type LIKE '{$filter}%' ";
+ }
+
$sql .= "ORDER BY type, schemaname, relname, name";
-
+
return $this->selectSet($sql);
}
/**
* Manage schemas within a database
*
- * $Id: database.php,v 1.52 2004/07/09 01:50:43 chriskl Exp $
+ * $Id: database.php,v 1.53 2004/07/12 07:13:32 chriskl Exp $
*/
// Include application functions
*/
function doFind($confirm = true, $msg = '') {
global $PHP_SELF, $data, $data, $misc;
- global $lang;
+ global $lang, $conf;
if (!isset($_GET['term'])) $_GET['term'] = '';
+ if (!isset($_GET['filter'])) $_GET['filter'] = '';
$misc->printDatabaseNav();
$misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strfind']));
echo "<form action=\"$PHP_SELF\" method=\"get\">\n";
echo "<p><input name=\"term\" value=\"", htmlspecialchars($_GET['term']),
"\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" />\n";
+ // Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities
+ echo "<select name=\"filter\">\n";
+ echo "\t<option value=\"\"", ($_GET['filter'] == '') ? ' selected="selected"' : '', ">{$lang['strallobjects']}</option>\n";
+ if ($data->hasSchemas())
+ echo "\t<option value=\"SCHEMA\"", ($_GET['filter'] == 'SCHEMA') ? ' selected="selected"' : '', ">{$lang['strschemas']}</option>\n";
+ if ($data->hasTables())
+ echo "\t<option value=\"TABLE\"", ($_GET['filter'] == 'TABLE') ? ' selected="selected"' : '', ">{$lang['strtables']}</option>\n";
+ if ($data->hasViews())
+ echo "\t<option value=\"VIEW\"", ($_GET['filter'] == 'VIEW') ? ' selected="selected"' : '', ">{$lang['strviews']}</option>\n";
+ if ($data->hasSequences())
+ echo "\t<option value=\"SEQUENCE\"", ($_GET['filter'] == 'SEQUENCE') ? ' selected="selected"' : '', ">{$lang['strsequences']}</option>\n";
+ if ($data->hasTables() || $data->hasViews()) {
+ echo "\t<option value=\"COLUMN\"", ($_GET['filter'] == 'COLUMN') ? ' selected="selected"' : '', ">{$lang['strcolumns']}</option>\n";
+ echo "\t<option value=\"RULE\"", ($_GET['filter'] == 'RULE') ? ' selected="selected"' : '', ">{$lang['strrules']}</option>\n";
+ }
+ if ($data->hasTables()) {
+ echo "\t<option value=\"INDEX\"", ($_GET['filter'] == 'INDEX') ? ' selected="selected"' : '', ">{$lang['strindexes']}</option>\n";
+ echo "\t<option value=\"TRIGGER\"", ($_GET['filter'] == 'TRIGGER') ? ' selected="selected"' : '', ">{$lang['strtriggers']}</option>\n";
+ }
+ if ($data->hasTables() || $data->hasDomainConstraints())
+ echo "\t<option value=\"CONSTRAINT\"", ($_GET['filter'] == 'CONSTRAINT') ? ' selected="selected"' : '', ">{$lang['strconstraints']}</option>\n";
+ if ($data->hasFunctions())
+ echo "\t<option value=\"FUNCTION\"", ($_GET['filter'] == 'FUNCTION') ? ' selected="selected"' : '', ">{$lang['strfunctions']}</option>\n";
+ if ($data->hasTypes() && $conf['show_advanced'])
+ echo "\t<option value=\"TYPE\"", ($_GET['filter'] == 'TYPE') ? ' selected="selected"' : '', ">{$lang['strtypes']}</option>\n";
+ if ($data->hasDomains())
+ echo "\t<option value=\"DOMAIN\"", ($_GET['filter'] == 'DOMAIN') ? ' selected="selected"' : '', ">{$lang['strdomains']}</option>\n";
+ if ($data->hasOperators() && $conf['show_advanced'])
+ echo "\t<option value=\"OPERATOR\"", ($_GET['filter'] == 'OPERATOR') ? ' selected="selected"' : '', ">{$lang['stroperators']}</option>\n";
+ if ($data->hasConversions() && $conf['show_advanced'])
+ echo "\t<option value=\"CONVERSION\"", ($_GET['filter'] == 'CONVERSION') ? ' selected="selected"' : '', ">{$lang['strconversions']}</option>\n";
+ if ($data->hasLanguages() && $conf['show_advanced'])
+ echo "\t<option value=\"LANGUAGE\"", ($_GET['filter'] == 'LANGUAGE') ? ' selected="selected"' : '', ">{$lang['strlanguages']}</option>\n";
+ if ($data->hasAggregates() && $conf['show_advanced'])
+ echo "\t<option value=\"AGGREGATE\"", ($_GET['filter'] == 'AGGREGATE') ? ' selected="selected"' : '', ">{$lang['straggregates']}</option>\n";
+ if ($data->hasOpClasses() && $conf['show_advanced'])
+ echo "\t<option value=\"OPCLASS\"", ($_GET['filter'] == 'OPCLASS') ? ' selected="selected"' : '', ">{$lang['stropclasses']}</option>\n";
+ echo "</select>\n";
echo "<input type=\"submit\" value=\"{$lang['strfind']}\" />\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"find\" />\n";
// If a search term has been specified, then perform the search
// and display the results, grouped by object type
if ($_GET['term'] != '') {
- $rs = &$data->findObject($_GET['term']);
+ $rs = &$data->findObject($_GET['term'], $_GET['filter']);
if ($rs->recordCount() > 0) {
$curr = '';
while (!$rs->EOF) {
/**
* Manage sequences in a database
*
- * $Id: sequences.php,v 1.22 2004/07/10 09:23:24 chriskl Exp $
+ * $Id: sequences.php,v 1.23 2004/07/12 07:13:32 chriskl Exp $
*/
// Include application functions
'title' => $lang['strowner'],
'field' => 'seqowner',
),
- 'tablespace' => array(
- 'title' => $lang['strtablespace'],
- 'field' => 'tablespace'
- ),
'actions' => array(
'title' => $lang['stractions'],
),
),
);
- if (!$data->hasTablespaces()) unset($columns['tablespace']);
-
$misc->printTable($sequences, $columns, $actions, $lang['strnosequences']);
echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreatesequence']}</a></p>\n";
if (!isset($_POST['formMaxValue'])) $_POST['formMaxValue'] = '';
if (!isset($_POST['formStartValue'])) $_POST['formStartValue'] = '';
if (!isset($_POST['formCacheValue'])) $_POST['formCacheValue'] = '';
- if (!isset($_POST['formSpc'])) $_POST['formSpc'] = '';
-
- // Fetch all tablespaces from the database
- if ($data->hasTablespaces()) $tablespaces = &$data->getTablespaces();
echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strsequences']} : {$lang['strcreatesequence']} </h2>\n";
$misc->printMsg($msg);
echo "<td class=\"data1\"><input type=\"checkbox\" name=\"formCycledValue\" value=\"",
(isset($_POST['formCycledValue']) ? ' checked="checked"' : ''), "\" /></td></tr>\n";
- // Tablespace (if there are any)
- if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) {
- echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strtablespace']}</th>\n";
- echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"formSpc\">\n";
- // Always offer the default (empty) option
- echo "\t\t\t\t<option value=\"\"",
- ($_POST['formSpc'] == '') ? ' selected="selected"' : '', "></option>\n";
- // Display all other tablespaces
- while (!$tablespaces->EOF) {
- $spcname = htmlspecialchars($tablespaces->f['spcname']);
- echo "\t\t\t\t<option value=\"{$spcname}\"",
- ($spcname == $_POST['formSpc']) ? ' selected="selected"' : '', ">{$spcname}</option>\n";
- $tablespaces->moveNext();
- }
- echo "\t\t\t</select>\n\t\t</td>\n\t</tr>\n";
- }
-
echo "</table>\n";
echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create_sequence\" />\n";
echo $misc->form;
global $data;
global $lang;
- // Default tablespace to null if it isn't set
- if (!isset($_POST['formSpc'])) $_POST['formSpc'] = null;
-
// Check that they've given a name and at least one column
if ($_POST['formSequenceName'] == '') doCreateSequence($lang['strsequenceneedsname']);
else {
$status = $data->createSequence($_POST['formSequenceName'],
$_POST['formIncrement'], $_POST['formMinValue'],
$_POST['formMaxValue'], $_POST['formStartValue'],
- $_POST['formCacheValue'], isset($_POST['formCycledValue']), $_POST['formSpc']);
+ $_POST['formCacheValue'], isset($_POST['formCycledValue']));
if ($status == 0) {
doDefault($lang['strsequencecreated']);
} else {
/**
* Alternative SQL editing window
*
- * $Id: sqledit.php,v 1.16 2004/07/09 03:24:12 chriskl Exp $
+ * $Id: sqledit.php,v 1.17 2004/07/12 07:13:32 chriskl Exp $
*/
// Include application functions
// The javascript action on the select box reloads the popup whenever the database is changed.
// This ensures that the correct page encoding is used. The exact URL to reload to is different
// between SQL and Find mode, however.
- if ($action == 'sql')
+ if ($action == 'sql') {
echo "<p>{$lang['strdatabase']}: <select name=\"database\" onChange=\"location.href='sqledit.php?action=" .
- urlencode($action) . "&database=' + encodeURI(options[selectedIndex].value) + '&query=' + encodeURI(query.value) + (paginate.checked ? '&paginate=on' : '') + '&" .
- SID . "'\">\n";
+ urlencode($action) . "&database=' + encodeURI(options[selectedIndex].value) + '&query=' + encodeURI(query.value) ";
+ if ($data->hasSchemas()) echo "+ '&search_path=' + encodeURI(search_path.value) ";
+ echo "+ (paginate.checked ? '&paginate=on' : '') + '&" . SID . "'\">\n";
+ }
else
echo "<p>{$lang['strdatabase']}: <select name=\"database\" onChange=\"location.href='sqledit.php?action=" .
- urlencode($action) . "&database=' + encodeURI(options[selectedIndex].value) + '&term=' + encodeURI(term.value) + '&" . SID . "'\">\n";
+ urlencode($action) . "&database=' + encodeURI(options[selectedIndex].value) + '&term=' + encodeURI(term.value) + '&filter=' + encodeURI(filter.value) + '&" . SID . "'\">\n";
while (!$databases->EOF) {
$dbname = $databases->f['datname'];
*/
function doFind() {
global $PHP_SELF, $data, $misc;
- global $lang;
+ global $lang, $conf;
if (!isset($_GET['term'])) $_GET['term'] = '';
+ if (!isset($_GET['filter'])) $_GET['filter'] = '';
$misc->printPopUpNav();
echo "<h2>{$lang['strfind']}</h2>\n";
_printDatabases();
echo "</p><p><input name=\"term\" value=\"", htmlspecialchars($_GET['term']),
"\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" />\n";
+
+ // Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities
+ echo "<select name=\"filter\">\n";
+ echo "\t<option value=\"\"", ($_GET['filter'] == '') ? ' selected="selected"' : '', ">{$lang['strallobjects']}</option>\n";
+ if ($data->hasSchemas())
+ echo "\t<option value=\"SCHEMA\"", ($_GET['filter'] == 'SCHEMA') ? ' selected="selected"' : '', ">{$lang['strschemas']}</option>\n";
+ if ($data->hasTables())
+ echo "\t<option value=\"TABLE\"", ($_GET['filter'] == 'TABLE') ? ' selected="selected"' : '', ">{$lang['strtables']}</option>\n";
+ if ($data->hasViews())
+ echo "\t<option value=\"VIEW\"", ($_GET['filter'] == 'VIEW') ? ' selected="selected"' : '', ">{$lang['strviews']}</option>\n";
+ if ($data->hasSequences())
+ echo "\t<option value=\"SEQUENCE\"", ($_GET['filter'] == 'SEQUENCE') ? ' selected="selected"' : '', ">{$lang['strsequences']}</option>\n";
+ if ($data->hasTables() || $data->hasViews()) {
+ echo "\t<option value=\"COLUMN\"", ($_GET['filter'] == 'COLUMN') ? ' selected="selected"' : '', ">{$lang['strcolumns']}</option>\n";
+ echo "\t<option value=\"RULE\"", ($_GET['filter'] == 'RULE') ? ' selected="selected"' : '', ">{$lang['strrules']}</option>\n";
+ }
+ if ($data->hasTables()) {
+ echo "\t<option value=\"INDEX\"", ($_GET['filter'] == 'INDEX') ? ' selected="selected"' : '', ">{$lang['strindexes']}</option>\n";
+ echo "\t<option value=\"TRIGGER\"", ($_GET['filter'] == 'TRIGGER') ? ' selected="selected"' : '', ">{$lang['strtriggers']}</option>\n";
+ }
+ if ($data->hasTables() || $data->hasDomainConstraints())
+ echo "\t<option value=\"CONSTRAINT\"", ($_GET['filter'] == 'CONSTRAINT') ? ' selected="selected"' : '', ">{$lang['strconstraints']}</option>\n";
+ if ($data->hasFunctions())
+ echo "\t<option value=\"FUNCTION\"", ($_GET['filter'] == 'FUNCTION') ? ' selected="selected"' : '', ">{$lang['strfunctions']}</option>\n";
+ if ($data->hasTypes() && $conf['show_advanced'])
+ echo "\t<option value=\"TYPE\"", ($_GET['filter'] == 'TYPE') ? ' selected="selected"' : '', ">{$lang['strtypes']}</option>\n";
+ if ($data->hasDomains())
+ echo "\t<option value=\"DOMAIN\"", ($_GET['filter'] == 'DOMAIN') ? ' selected="selected"' : '', ">{$lang['strdomains']}</option>\n";
+ if ($data->hasOperators() && $conf['show_advanced'])
+ echo "\t<option value=\"OPERATOR\"", ($_GET['filter'] == 'OPERATOR') ? ' selected="selected"' : '', ">{$lang['stroperators']}</option>\n";
+ if ($data->hasConversions() && $conf['show_advanced'])
+ echo "\t<option value=\"CONVERSION\"", ($_GET['filter'] == 'CONVERSION') ? ' selected="selected"' : '', ">{$lang['strconversions']}</option>\n";
+ if ($data->hasLanguages() && $conf['show_advanced'])
+ echo "\t<option value=\"LANGUAGE\"", ($_GET['filter'] == 'LANGUAGE') ? ' selected="selected"' : '', ">{$lang['strlanguages']}</option>\n";
+ if ($data->hasAggregates() && $conf['show_advanced'])
+ echo "\t<option value=\"AGGREGATE\"", ($_GET['filter'] == 'AGGREGATE') ? ' selected="selected"' : '', ">{$lang['straggregates']}</option>\n";
+ if ($data->hasOpClasses() && $conf['show_advanced'])
+ echo "\t<option value=\"OPCLASS\"", ($_GET['filter'] == 'OPCLASS') ? ' selected="selected"' : '', ">{$lang['stropclasses']}</option>\n";
+ echo "</select>\n";
+
echo "<input type=\"submit\" value=\"{$lang['strfind']}\" />\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"find\" /></p>\n";