add cluster support on indexes and constraints. fix lack of sorting of constraints...
authorchriskl <chriskl>
Fri, 3 Oct 2003 07:38:54 +0000 (07:38 +0000)
committerchriskl <chriskl>
Fri, 3 Oct 2003 07:38:54 +0000 (07:38 +0000)
BUGS
HISTORY
classes/database/Postgres.php
classes/database/Postgres71.php
classes/database/Postgres73.php
classes/database/Postgres74.php
constraints.php
indexes.php
lang/english.php
lang/recoded/english.php
libraries/errorhandler.inc.php

diff --git a/BUGS b/BUGS
index 8b137891791fe96927ad78e64b0aad7bded08bdc..a9b5b770cb40f354b4f5d2c4a20bbfc11c550105 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1 +1,3 @@
+choose operator on select screen
+remove default_user from config.inc.php?
 
diff --git a/HISTORY b/HISTORY
index aa4c02b7fd6edb7d880b2ae24ad0d2f0bd966512..f100c197d25d006d367cf09a6506324882103ff2 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -5,13 +5,17 @@ Version 3.2-dev
 ---------------
 
 Features
---------
 * Extra login security to prevent logging into servers as postgres and
   no password - a VERY common newbie error.
+* Cluster indexes and indexed constraints
+* Display clustered status of indexes and indexed constraints
 
 Bugs
-----
 * Added legal DOCTYPE
+* tabloid columns aligned right
+
+Translations
+* Afrikaans from Petri Jooste [rkwjpj@puk.ac.za]
 
 Version 3.1
 -----------
index 67f8f4fe27c8f29f418a81c4e643b867a751cd67..4b492823b0eefc8dd7b1134f02d3fc963f151fe6 100755 (executable)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres.php,v 1.147 2003/09/14 10:03:27 chriskl Exp $
+ * $Id: Postgres.php,v 1.148 2003/10/03 07:38:55 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1674,6 +1674,27 @@ class Postgres extends BaseDB {
                return $this->selectSet($sql);
        }
        
+       /**
+        * Drops an operator
+        * @param $oprname The name of the operator to drop
+        * @param $lefttype The left type (NULL for none)
+        * @param $righttype The right type (NULL for none)
+        * @param $cascade True to cascade drop, false to restrict
+        * @return 0 success
+        */
+       function dropOperator($oprname, $lefttype, $righttype, $cascade) {
+               $this->fieldClean($oprname);
+
+               $sql = "DROP OPERATOR \"{$oprname}\"(";
+               echo ($lefttype === null) ? 'NONE' : $lefttype;
+               echo ', ';
+               echo ($righttype === null) ? 'NONE' : $righttype;
+               echo ')';               
+               if ($cascade) $sql .= " CASCADE";
+
+               return $this->execute($sql);
+       }       
+       
        // User functions
        
        /**
@@ -2506,6 +2527,8 @@ class Postgres extends BaseDB {
                                pc.oid=pi.indexrelid
                                AND (pi.indisunique OR pi.indisprimary)
                                AND pi.indrelid = (SELECT oid FROM pg_class WHERE relname='{$table}')
+                       ORDER BY
+                               1
                ";
 
                return $this->selectSet($sql);
index f39a5215b3adad77c5751de766ace41bb93a40bf..f4877bc88748f98a3be8ef5278d65cb09707c0ad 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres71.php,v 1.37 2003/08/06 07:04:45 chriskl Exp $
+ * $Id: Postgres71.php,v 1.38 2003/10/03 07:38:55 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -266,6 +266,8 @@ class Postgres71 extends Postgres {
                                        AND (pi.indisunique OR pi.indisprimary)
                        ) AS sub
                        WHERE relid = (SELECT oid FROM pg_class WHERE relname='{$table}')
+                       ORDER BY
+                               1
                ";
 
                return $this->selectSet($sql);
index fa13f9e55c9a07d9bbd35230d52e254d4a4c22e2..a1ae4435734b96d49dff445036b65e6f73fe23c7 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres73.php,v 1.63 2003/09/08 09:26:18 chriskl Exp $
+ * $Id: Postgres73.php,v 1.64 2003/10/03 07:38:55 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -450,7 +450,8 @@ class Postgres73 extends Postgres72 {
        function &getIndexes($table = '') {
                $this->clean($table);
 
-               $sql = "SELECT c2.relname, i.indisprimary, i.indisunique, pg_catalog.pg_get_indexdef(i.indexrelid) as pg_get_indexdef
+               $sql = "SELECT c2.relname, i.indisprimary, i.indisunique, i.indisclustered,
+                       pg_catalog.pg_get_indexdef(i.indexrelid) as pg_get_indexdef
                        FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i
                        WHERE c.relname = '{$table}' AND pg_catalog.pg_table_is_visible(c.oid) 
                        AND c.oid = i.indrelid AND i.indexrelid = c2.oid
@@ -459,6 +460,31 @@ class Postgres73 extends Postgres72 {
 
                return $this->selectSet($sql);
        }
+       
+       /**
+        * Clusters an index
+        * @param $index The name of the index
+        * @param $table The table the index is on
+        * @param $analyze True to run analyze afterward, false otherwise
+        * @return 0 success
+        */
+       function clusterIndex($index, $table, $analyze) {
+               $this->fieldClean($index);
+               $this->fieldClean($table);
+
+               // We don't bother with a transaction here, as there's no point rolling
+               // back an expensive cluster if a cheap analyze fails for whatever reason
+               $sql = "CLUSTER \"{$index}\" ON \"{$table}\"";
+               $status = $this->execute($sql);
+               if ($status != 0) return $status;
+               
+               if ($analyze) {
+                       $sql = "ANALYZE \"{$table}\"";
+                       return $this->execute($sql);
+               }
+               else
+                       return $status;
+       }       
 
        /**
         * Grabs a single trigger
@@ -808,11 +834,8 @@ class Postgres73 extends Postgres72 {
        function &getConstraints($table) {
                $this->clean($table);
 
-               $status = $this->beginTransaction();
-               if ($status != 0) return -1;
-
                $sql = "
-                       SELECT conname, consrc, contype, indkey FROM (
+                       SELECT conname, consrc, contype, indkey, indisclustered FROM (
                                SELECT
                                        conname,
                                        CASE WHEN contype='f' THEN
@@ -822,7 +845,8 @@ class Postgres73 extends Postgres72 {
                                        END AS consrc,
                                        contype,
                                        conrelid AS relid,
-                                       NULL AS indkey
+                                       NULL AS indkey,
+                                       FALSE AS indisclustered
                                FROM
                                        pg_catalog.pg_constraint
                                WHERE
@@ -837,7 +861,8 @@ class Postgres73 extends Postgres72 {
                                                'u'
                                        END,
                                        pi.indrelid,
-                                       indkey
+                                       indkey,
+                                       pi.indisclustered
                                FROM
                                        pg_catalog.pg_class pc,
                                        pg_catalog.pg_index pi
@@ -848,6 +873,8 @@ class Postgres73 extends Postgres72 {
                        WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}'
                                        AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace
                                        WHERE nspname='{$this->_schema}'))
+                       ORDER BY
+                               1
                ";
 
                return $this->selectSet($sql);
@@ -871,6 +898,40 @@ class Postgres73 extends Postgres72 {
                return $this->execute($sql);
        }
 
+       /**
+        * Finds the foreign keys that refer to the specified table
+        * @param $table The table to find referrers for
+        * @return A recordset
+        */
+       function &getReferrers($table) {
+               $this->clean($table);
+
+               $status = $this->beginTransaction();
+               if ($status != 0) return -1;
+
+               $sql = "
+                       SELECT
+                               pn.nspname,
+                               pl.relname,
+                               pc.conname,
+                               pg_catalog.pg_get_constraintdef(pc.oid) AS consrc
+                       FROM
+                               pg_catalog.pg_constraint pc,
+                               pg_catalog.pg_namespace pn,
+                               pg_catalog.pg_class pl
+                       WHERE
+                               pc.connamespace = pn.oid
+                               AND pc.conrelid = pl.oid
+                               AND pc.contype = 'f'
+                               AND confrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}'
+                                       AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace
+                                       WHERE nspname='{$this->_schema}'))
+                       ORDER BY 1,2,3
+               ";
+
+               return $this->selectSet($sql);
+       }
+
        // Privilege functions
 
        /**
index a023443b52319b1b13f718f10b776a5c5538d4ae..91f257f67e6f216b9afb370c971ea168ecfb3f67 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres74.php,v 1.14 2003/09/21 02:58:16 chriskl Exp $
+ * $Id: Postgres74.php,v 1.15 2003/10/03 07:38:55 chriskl Exp $
  */
 
 include_once('classes/database/Postgres73.php');
@@ -123,7 +123,8 @@ class Postgres74 extends Postgres73 {
        function &getIndexes($table = '') {
                $this->clean($table);
 
-               $sql = "SELECT c2.relname, i.indisprimary, i.indisunique, pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) as pg_get_indexdef
+               $sql = "SELECT c2.relname, i.indisprimary, i.indisunique, i.indisclustered,
+                       pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) as pg_get_indexdef
                        FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i
                        WHERE c.relname = '{$table}' AND pg_catalog.pg_table_is_visible(c.oid) 
                        AND c.oid = i.indrelid AND i.indexrelid = c2.oid
@@ -180,16 +181,35 @@ class Postgres74 extends Postgres73 {
        function &getConstraints($table) {
                $this->clean($table);
 
+               // This SQL is greatly complicated by the need to retrieve
+               // index clustering information for primary and unique constraints
                $sql = "SELECT
-                               conname,
-                               pg_catalog.pg_get_constraintdef(oid, true) AS consrc,
-                               contype
+                               pc.conname,
+                               pg_catalog.pg_get_constraintdef(pc.oid, true) AS consrc,
+                               pc.contype,
+                               CASE WHEN pc.contype='u' OR pc.contype='p' THEN (
+                                       SELECT
+                                               indisclustered
+                                       FROM
+                                               pg_catalog.pg_depend pd,
+                                               pg_catalog.pg_class pl,
+                                               pg_index pi
+                                       WHERE
+                                               pd.refclassid=pc.tableoid 
+                                               AND pd.refobjid=pc.oid
+                                               AND pd.objid=pl.oid
+                                               AND pl.oid=pi.indexrelid
+                               ) ELSE
+                                       NULL
+                               END AS indisclustered
                        FROM
-                               pg_catalog.pg_constraint
+                               pg_catalog.pg_constraint pc
                        WHERE
-                               conrelid = (SELECT oid FROM pg_class WHERE relname='{$table}'
+                               pc.conrelid = (SELECT oid FROM pg_class WHERE relname='{$table}'
                                        AND relnamespace = (SELECT oid FROM pg_namespace
                                        WHERE nspname='{$this->_schema}'))
+                       ORDER BY
+                               1
                ";
 
                return $this->selectSet($sql);
index d12761b3dd014eddc69f85e95f475bb7a0f55e9d..a94131ffbc8b61d4996671f7e82dbcb76ef83e29 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List constraints on a table
         *
-        * $Id: constraints.php,v 1.20 2003/09/09 06:23:12 chriskl Exp $
+        * $Id: constraints.php,v 1.21 2003/10/03 07:38:54 chriskl Exp $
         */
 
        // Include application functions
        $action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
        $PHP_SELF = $_SERVER['PHP_SELF'];
 
+       /**
+        * Show confirmation of cluster index and perform actual cluster
+        */
+       function doClusterIndex($confirm) {
+               global $localData, $database, $misc;
+               global $PHP_SELF, $lang;
+
+               if ($confirm) {
+                       echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ",
+                               $misc->printVal($_REQUEST['table']), ": " , $misc->printVal($_REQUEST['constraint']), ": {$lang['strcluster']}</h2>\n";
+
+                       echo "<p>", sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['constraint'])), "</p>\n";
+
+                       echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+                       echo "<input type=\"hidden\" name=\"action\" value=\"cluster_constraint\" />\n";
+                       echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
+                       echo "<input type=\"hidden\" name=\"constraint\" value=\"", htmlspecialchars($_REQUEST['constraint']), "\" />\n";
+                       echo $misc->form;
+                       echo "<p><input type=\"checkbox\" name=\"analyze\" /> {$lang['stranalyze']}</p>\n";
+                       echo "<input type=\"submit\" name=\"cluster\" value=\"{$lang['strcluster']}\" />\n";
+                       echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
+                       echo "</form>\n";
+               }
+               else {
+                       $status = $localData->clusterIndex($_POST['constraint'], $_POST['table'], isset($_POST['analyze']));
+                       if ($status == 0)
+                               doDefault($lang['strclusteredgood'] . ((isset($_POST['analyze']) ? ' ' . $lang['stranalyzegood'] : '')));
+                       else
+                               doDefault($lang['strclusteredbad']);
+               }
+       }
 
        /**
         * Confirm and then actually add a FOREIGN KEY constraint
 
                if ($constraints->recordCount() > 0) {
                        echo "<table>\n";
-                       echo "<tr><th class=\"data\">{$lang['strname']}</th><th class=\"data\">{$lang['strdefinition']}</th><th class=\"data\">{$lang['stractions']}</th>\n";
+                       echo "<tr><th class=\"data\">{$lang['strname']}</th><th class=\"data\">{$lang['strdefinition']}</th>\n";
+                       if ($data->hasCluster()) {
+                               echo "<th class=\"data\">{$lang['strclustered']}</th>";
+                               echo "<th class=\"data\" colspan=\"2\">{$lang['stractions']}</th>\n";
+                       }
+                       else {
+                               echo "<th class=\"data\">{$lang['stractions']}</th>\n";
+                       }
+                       echo "</tr>\n";
                        $i = 0;
                        
                        while (!$constraints->EOF) {
                                        echo ")";
                                }
                                echo "</td>";
+                               if ($data->hasCluster()) {
+                                       if ($constraints->f['indisclustered'] !== null) {
+                                               $constraints->f['indisclustered'] = $data->phpBool($constraints->f['indisclustered']);
+                                               echo "<td class=\"data{$id}\">", ($constraints->f['indisclustered'] ? $lang['stryes'] : $lang['strno']), "</td>";
+                                       } else {
+                                               echo "<td class=\"data{$id}\"></td>";
+                                       }
+                               }
                                echo "<td class=\"opbutton{$id}\">";
                                echo "<a href=\"$PHP_SELF?action=confirm_drop&{$misc->href}&constraint=", urlencode($constraints->f[$data->cnFields['conname']]),
-                                       "&table=", urlencode($_REQUEST['table']), "&type=", urlencode($constraints->f['contype']), "\">{$lang['strdrop']}</td></tr>\n";
+                                       "&table=", urlencode($_REQUEST['table']), "&type=", urlencode($constraints->f['contype']), "\">{$lang['strdrop']}</td>";
+                               if ($data->hasCluster()) {
+                                       echo "<td class=\"opbutton{$id}\">";
+                                       // You can only cluster primary key and unique constraints!
+                                       if ($constraints->f['contype'] == 'u' || $constraints->f['contype'] == 'p') {
+                                               echo "<a href=\"$PHP_SELF?action=confirm_cluster_constraint&{$misc->href}&constraint=", urlencode($constraints->f[$data->cnFields['conname']]), 
+                                                       "&table=", urlencode($_REQUEST['table']), "\">{$lang['strcluster']}</a>";
+                                       }
+                                       echo "</td>\n";
+                                               
+                               }
+                               echo "</tr>\n";
 
                                $constraints->moveNext();
                                $i++;
                $misc->printBody();
 
        switch ($action) {
+               case 'cluster_constraint':
+                       if (isset($_POST['cluster'])) doClusterIndex(false);
+                       else doDefault();
+                       break;
+               case 'confirm_cluster_constraint':
+                       doClusterIndex(true);
+                       break;
                case 'add_foreign_key':
                        addForeignKey(1);
                        break;
index 4f39eb99b3cb40c2abf956120ab221b55ae9a439..b37bb54487391c4302455582878e3a21e57ece62 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List indexes on a table
         *
-        * $Id: indexes.php,v 1.17 2003/08/12 08:18:53 chriskl Exp $
+        * $Id: indexes.php,v 1.18 2003/10/03 07:38:54 chriskl Exp $
         */
 
        // Include application functions
        $action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
        $PHP_SELF = $_SERVER['PHP_SELF'];
 
+       /**
+        * Show confirmation of cluster index and perform actual cluster
+        */
+       function doClusterIndex($confirm) {
+               global $localData, $database, $misc;
+               global $PHP_SELF, $lang;
+
+               if ($confirm) {
+                       echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ",
+                               $misc->printVal($_REQUEST['table']), ": " , $misc->printVal($_REQUEST['index']), ": {$lang['strcluster']}</h2>\n";
+
+                       echo "<p>", sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), "</p>\n";
+
+                       echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+                       echo "<input type=\"hidden\" name=\"action\" value=\"cluster_index\" />\n";
+                       echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
+                       echo "<input type=\"hidden\" name=\"index\" value=\"", htmlspecialchars($_REQUEST['index']), "\" />\n";
+                       echo $misc->form;
+                       echo "<p><input type=\"checkbox\" name=\"analyze\" /> {$lang['stranalyze']}</p>\n";
+                       echo "<input type=\"submit\" name=\"cluster\" value=\"{$lang['strcluster']}\" />\n";
+                       echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
+                       echo "</form>\n";
+               }
+               else {
+                       $status = $localData->clusterIndex($_POST['index'], $_POST['table'], isset($_POST['analyze']));
+                       if ($status == 0)
+                               doDefault($lang['strclusteredgood'] . ((isset($_POST['analyze']) ? ' ' . $lang['stranalyzegood'] : '')));
+                       else
+                               doDefault($lang['strclusteredbad']);
+               }
+
+       }
+
        /**
         * Displays a screen where they can enter a new index
         */
                
                if ($indexes->recordCount() > 0) {
                        echo "<table>\n";
-                       echo "<tr><th class=\"data\">{$lang['strname']}</th><th class=\"data\">{$lang['strdefinition']}</th>";
-                       echo "<th class=\"data\">{$lang['stractions']}</th>\n";
+                       echo "<tr>\n";
+                       echo "<th class=\"data\">{$lang['strname']}</th><th class=\"data\">{$lang['strdefinition']}</th>";
+                       if ($data->hasCluster()) {
+                               echo "<th class=\"data\">{$lang['strclustered']}</th>";
+                               echo "<th class=\"data\" colspan=\"2\">{$lang['stractions']}</th>\n";
+                       }
+                       else {
+                               echo "<th class=\"data\">{$lang['stractions']}</th>\n";
+                       }
+                       echo "</tr>\n";
                        $i = 0;
                        
                        while (!$indexes->EOF) {
                                $id = ( ($i % 2 ) == 0 ? '1' : '2' );
                                echo "<tr><td class=\"data{$id}\">", $misc->printVal( $indexes->f[$data->ixFields['idxname']]), "</td>";
                                echo "<td class=\"data{$id}\">", $misc->printVal( $indexes->f[$data->ixFields['idxdef']]), "</td>";
+                               if ($data->hasCluster()) {
+                                       $indexes->f['indisclustered'] = $data->phpBool($indexes->f['indisclustered']);
+                                       echo "<td class=\"data{$id}\">", ($indexes->f['indisclustered'] ? $lang['stryes'] : $lang['strno']), "</td>";
+                               }
                                echo "<td class=\"opbutton{$id}\">";
                                echo "<a href=\"$PHP_SELF?action=confirm_drop_index&{$misc->href}&index=", urlencode( $indexes->f[$data->ixFields['idxname']]), 
-                                       "&table=", urlencode($_REQUEST['table']), "\">{$lang['strdrop']}</td></tr>\n";
+                                       "&table=", urlencode($_REQUEST['table']), "\">{$lang['strdrop']}</td>";
+                               if ($data->hasCluster()) {
+                                       echo "<td class=\"opbutton{$id}\">";
+                                       echo "<a href=\"$PHP_SELF?action=confirm_cluster_index&{$misc->href}&index=", urlencode( $indexes->f[$data->ixFields['idxname']]), 
+                                               "&table=", urlencode($_REQUEST['table']), "\">{$lang['strcluster']}</td>";
+                               }
+                               echo "</tr>\n";
 
                                $indexes->movenext();
                                $i++;
                $misc->printBody();
        
        switch ($action) {
+               case 'cluster_index':
+                       if (isset($_POST['cluster'])) doClusterIndex(false);
+                       else doDefault();
+                       break;
+               case 'confirm_cluster_index':
+                       doClusterIndex(true);
+                       break;
                case 'save_create_index':
                        if (isset($_POST['cancel'])) doDefault();
                        else doSaveCreateIndex();
index 4fe9ed22cc13989853a6eed3239a27db3a64e2f1..7492b470f6f1f2d588396e14144f4bb1255f7a89 100755 (executable)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.107 2003/09/30 07:43:08 chriskl Exp $
+        * $Id: english.php,v 1.108 2003/10/03 07:38:55 chriskl Exp $
         */
 
        // Language and character set
@@ -87,6 +87,7 @@
        $lang['strvacuum'] = 'Vacuum';
        $lang['stranalyze'] = 'Analyze';
        $lang['strcluster'] = 'Cluster';
+       $lang['strclustered'] = 'Clustered?';
        $lang['strreindex'] = 'Reindex';
        $lang['strrun'] = 'Run';
        $lang['stradd'] = 'Add';
        $lang['stroptions'] = 'Options';
        $lang['strrefresh'] = 'Refresh';
        $lang['strdownload'] = 'Download';
+       $lang['strinfo'] = 'Info';
 
        // Error handling
        $lang['strnoframes'] = 'You need a frames-enabled browser to use this application.';
        $lang['strindextype'] = 'Type of index';
        $lang['strtablecolumnlist'] = 'Columns in table';
        $lang['strindexcolumnlist'] = 'Columns in index';
+       $lang['strconfcluster'] = 'Are you sure you want to cluster "%s"?';
+       $lang['strclusteredgood'] = 'Cluster complete.';
+       $lang['strclusteredbad'] = 'Cluster failed.';
 
        // Rules
        $lang['strrules'] = 'Rules';
        $lang['stroperatordropped'] = 'Operator dropped.';
        $lang['stroperatordroppedbad'] = 'Operator drop failed.';
 
+       // Info
+       $lang['strreferringtables'] = 'Referring Tables';
+
        // Miscellaneous
        $lang['strtopbar'] = '%s running on %s:%s -- You are logged in as user "%s", %s';
        $lang['strtimefmt'] = 'jS M, Y g:iA';
index c95a7689d9a03f41d49a81db5daab46e77c561c4..57234f99f8be0aab163cc800359981daf30e2938 100644 (file)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.59 2003/09/30 07:43:09 chriskl Exp $
+        * $Id: english.php,v 1.60 2003/10/03 07:38:55 chriskl Exp $
         */
 
        // Language and character set
@@ -87,6 +87,7 @@
        $lang['strvacuum'] = 'Vacuum';
        $lang['stranalyze'] = 'Analyze';
        $lang['strcluster'] = 'Cluster';
+       $lang['strclustered'] = 'Clustered?';
        $lang['strreindex'] = 'Reindex';
        $lang['strrun'] = 'Run';
        $lang['stradd'] = 'Add';
        $lang['stroptions'] = 'Options';
        $lang['strrefresh'] = 'Refresh';
        $lang['strdownload'] = 'Download';
+       $lang['strinfo'] = 'Info';
 
        // Error handling
        $lang['strnoframes'] = 'You need a frames-enabled browser to use this application.';
        $lang['strindextype'] = 'Type of index';
        $lang['strtablecolumnlist'] = 'Columns in table';
        $lang['strindexcolumnlist'] = 'Columns in index';
+       $lang['strconfcluster'] = 'Are you sure you want to cluster &quot;%s&quot;?';
+       $lang['strclusteredgood'] = 'Cluster complete.';
+       $lang['strclusteredbad'] = 'Cluster failed.';
 
        // Rules
        $lang['strrules'] = 'Rules';
        $lang['stroperatordropped'] = 'Operator dropped.';
        $lang['stroperatordroppedbad'] = 'Operator drop failed.';
 
+       // Info
+       $lang['strreferringtables'] = 'Referring Tables';
+
        // Miscellaneous
        $lang['strtopbar'] = '%s running on %s:%s -- You are logged in as user &quot;%s&quot;, %s';
        $lang['strtimefmt'] = 'jS M, Y g:iA';
index 0bfbdc3f83123cd6b13bd3dacb015ced57014c56..11600fc23b25b053581711afc90e61fdfd33e07b 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Overrides default ADODB error handler to provide nicer error handling.
  *
- * $Id: errorhandler.inc.php,v 1.12 2003/05/15 13:40:27 chriskl Exp $
+ * $Id: errorhandler.inc.php,v 1.13 2003/10/03 07:38:55 chriskl Exp $
  */
 
 define('ADODB_ERROR_HANDLER','Error_Handler');
@@ -31,7 +31,7 @@ function Error_Handler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
                $s = "<p><b>{$lang['strsqlerror']}</b><br />" . $misc->printVal($errmsg) . "</p>
                      <p><b>{$lang['strinstatement']}</b><br />" . $misc->printVal($sql) . "</p>
                ";
-               echo "<table class=\"error\" cellpadding=\"5\"><tr><td>{$s}</td></tr></table>\n";
+               echo "<table class=\"error\" cellpadding=\"5\"><tr><td>{$s}</td></tr></table><br />\n";
 
                break;
 
@@ -43,7 +43,7 @@ function Error_Handler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
                break;
        default:
                $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
-               echo "<table class=\"error\" cellpadding=\"5\"><tr><td>{$s}</td></tr></table>\n";
+               echo "<table class=\"error\" cellpadding=\"5\"><tr><td>{$s}</td></tr></table><br />\n";
                break;
        }
        /*