summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchriskl2003-10-03 07:38:54 +0000
committerchriskl2003-10-03 07:38:54 +0000
commitb196c88223b5844fb0fe20f9615fcf87f62f179a (patch)
tree624fddf4fb7c08ad7619afe62275d183749474be
parent9468a8c146ed44cc47fbf419c02b16848608ea30 (diff)
add cluster support on indexes and constraints. fix lack of sorting of constraints. better format sql errors. update support files
-rw-r--r--BUGS2
-rw-r--r--HISTORY8
-rwxr-xr-xclasses/database/Postgres.php25
-rw-r--r--classes/database/Postgres71.php4
-rw-r--r--classes/database/Postgres73.php77
-rw-r--r--classes/database/Postgres74.php34
-rw-r--r--constraints.php71
-rw-r--r--indexes.php66
-rwxr-xr-xlang/english.php10
-rw-r--r--lang/recoded/english.php10
-rw-r--r--libraries/errorhandler.inc.php6
11 files changed, 282 insertions, 31 deletions
diff --git a/BUGS b/BUGS
index 8b137891..a9b5b770 100644
--- 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 aa4c02b7..f100c197 100644
--- 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 [[email protected]]
Version 3.1
-----------
diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php
index 67f8f4fe..4b492823 100755
--- a/classes/database/Postgres.php
+++ b/classes/database/Postgres.php
@@ -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);
diff --git a/classes/database/Postgres71.php b/classes/database/Postgres71.php
index f39a5215..f4877bc8 100644
--- a/classes/database/Postgres71.php
+++ b/classes/database/Postgres71.php
@@ -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);
diff --git a/classes/database/Postgres73.php b/classes/database/Postgres73.php
index fa13f9e5..a1ae4435 100644
--- a/classes/database/Postgres73.php
+++ b/classes/database/Postgres73.php
@@ -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
/**
diff --git a/classes/database/Postgres74.php b/classes/database/Postgres74.php
index a023443b..91f257f6 100644
--- a/classes/database/Postgres74.php
+++ b/classes/database/Postgres74.php
@@ -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);
diff --git a/constraints.php b/constraints.php
index d12761b3..a94131ff 100644
--- a/constraints.php
+++ b/constraints.php
@@ -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
@@ -13,6 +13,37 @@
$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
@@ -379,7 +410,15 @@
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) {
@@ -396,9 +435,28 @@
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++;
@@ -430,6 +488,13 @@
$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;
diff --git a/indexes.php b/indexes.php
index 4f39eb99..b37bb544 100644
--- a/indexes.php
+++ b/indexes.php
@@ -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
@@ -14,6 +14,39 @@
$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
*/
function doCreateIndex($msg = '') {
@@ -169,17 +202,35 @@
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++;
@@ -201,6 +252,13 @@
$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();
diff --git a/lang/english.php b/lang/english.php
index 4fe9ed22..7492b470 100755
--- a/lang/english.php
+++ b/lang/english.php
@@ -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';
@@ -106,6 +107,7 @@
$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.';
@@ -317,6 +319,9 @@
$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';
@@ -487,6 +492,9 @@
$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';
diff --git a/lang/recoded/english.php b/lang/recoded/english.php
index c95a7689..57234f99 100644
--- a/lang/recoded/english.php
+++ b/lang/recoded/english.php
@@ -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';
@@ -106,6 +107,7 @@
$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.';
@@ -317,6 +319,9 @@
$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';
@@ -487,6 +492,9 @@
$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';
diff --git a/libraries/errorhandler.inc.php b/libraries/errorhandler.inc.php
index 0bfbdc3f..11600fc2 100644
--- a/libraries/errorhandler.inc.php
+++ b/libraries/errorhandler.inc.php
@@ -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;
}
/*