? phpPgAdmin/trig_properties.php Index: phpPgAdmin/db_details.php =================================================================== RCS file: /usr/local/cvsroot/phppgadmin/phpPgAdmin/db_details.php,v retrieving revision 1.1.1.1 diff -r1.1.1.1 db_details.php 12c12 < switch($rel_type) { --- > switch($rel_type) { 54,118d53 < case "index": < $indexs = pg_exec($link, "SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relkind ='i' ORDER BY relname"); < $num_indexs = @pg_numrows($indexs); < if ($num_indexs == 0) { < echo "
$strNo $strIndicies $strFound
"; < } else { < $i = 0; < echo "\n\n"; < while ($i < $num_indexs) { < $bgcolor = $bgcolor_one; < $i % 2 ? 0 : $bgcolor = $bgcolor_two; < $index = pg_result($indexs, $i, 'relname'); < $query = "?db=$db&server=$server&rel_type=$rel_type&index=$index"; < $prop_query = " < SELECT < ic.relname AS index_name, < bc.relname AS tab_name, < a.attname AS column_name, < i.indisunique AS unique_key, < i.indisprimary AS primary_key < FROM < pg_class bc, < pg_class ic, < pg_index i, < pg_attribute a < WHERE < i.indrelid = bc.oid < and i.indexrelid = ic.oid < and < ( < i.indkey[0] = a.attnum < or < i.indkey[1] = a.attnum < or < i.indkey[2] = a.attnum < or < i.indkey[3] = a.attnum < or < i.indkey[4] = a.attnum < or < i.indkey[5] = a.attnum < or < i.indkey[6] = a.attnum < or < i.indkey[7] = a.attnum < ) < and a.attrelid = bc.oid < and i.indproc = '0'::oid < and ic.relname = '$index' < ORDER BY index_name, tab_name, column_name; < "; < ?> < > < < < < < < < \n"; < } < break; 191a127,235 > case "trigger": // Triggers > $sql_get_trig = " > SELECT ptr.*, pt.typname as result, pc.relname as relname > FROM pg_trigger ptr, pg_type pt, pg_class pc > WHERE ptr.tgtype=pt.oid > AND ptr.tgrelid=pc.oid > AND tgname !~ 'pg_.*' > ORDER BY tgname > "; > $triggers = pg_exec($link, $sql_get_trig); > $num_triggers = @pg_numrows($triggers); > if ($num_triggers == 0) { > echo "
$strNo $strTriggers $strFound
"; > } else { > echo "
$strIndicies
">&zero_rows=">
\n"; > echo "\n"; > > for ($i = 0; $i < $num_triggers; $i++) { > $trig_ary = pg_fetch_array($triggers, $i); > > $bgcolor = $cfgBgcolorOne; > $i % 2 ? 0 : $bgcolor = $cfgBgcolorTwo; > > $classname = $trig_ary[relname]; > $trig_disp = "$trig_ary[tgname]"; > $trig_is_const = ($trig_ary[tgisconstraint] == 't') ? 'Y' : 'N'; > $trig_sql = "$cfgQuotes$trig_ary[tgname]$cfgQuotes"; > $query = "?db=$db&rel_type=$rel_type&trigger=" . urlencode($trig_ary[tgname]); > ?> > > > > > > > > > > > > } > echo "
$strRetType$strTrigger$strTable$strIsConstraint$strAction
&zero_rows=">
\n"; > } > break; > case "index": > $indexs = pg_exec($link, "SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relkind ='i' ORDER BY relname"); > $num_indexs = @pg_numrows($indexs); > if ($num_indexs == 0) { > echo "
$strNo $strIndicies $strFound
"; > } else { > $i = 0; > echo "\n\n"; > while ($i < $num_indexs) { > $bgcolor = $bgcolor_one; > $i % 2 ? 0 : $bgcolor = $bgcolor_two; > $index = pg_result($indexs, $i, 'relname'); > $query = "?db=$db&server=$server&rel_type=$rel_type&index=$index"; > $prop_query = " > SELECT > ic.relname AS index_name, > bc.relname AS tab_name, > a.attname AS column_name, > i.indisunique AS unique_key, > i.indisprimary AS primary_key > FROM > pg_class bc, > pg_class ic, > pg_index i, > pg_attribute a > WHERE > i.indrelid = bc.oid > and i.indexrelid = ic.oid > and > ( > i.indkey[0] = a.attnum > or > i.indkey[1] = a.attnum > or > i.indkey[2] = a.attnum > or > i.indkey[3] = a.attnum > or > i.indkey[4] = a.attnum > or > i.indkey[5] = a.attnum > or > i.indkey[6] = a.attnum > or > i.indkey[7] = a.attnum > ) > and a.attrelid = bc.oid > and i.indproc = '0'::oid > and ic.relname = '$index' > ORDER BY index_name, tab_name, column_name; > "; > ?> > > > > > > > > > $i++; > } > echo "
$strIndicies
">&zero_rows=">
\n"; > } > break; 258a303,305 > } > if ($rel_type != "trigger") { > echo "
  • $strDisplay $strTriggers "; Index: phpPgAdmin/english.inc.php =================================================================== RCS file: /usr/local/cvsroot/phppgadmin/phpPgAdmin/english.inc.php,v retrieving revision 1.3 diff -r1.3 english.inc.php 15a16 > $strConstraintName = "Constraint Name"; 23a25 > $strDeferrable = "Deferrable"; 34a37 > $strEnabled = "Enabled"; 51a55 > $strInitDeferred = "Init. Deferred"; 55a60 > $strIsConstraint = "Constraint"; 182a188 > $strTable = "Table"; 183a190,191 > $strTrigger = "Trigger"; > $strTriggers = "Triggers";