From 44c979907579f4b3f5ebeddae6bd17593896f202 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 28 Aug 2006 02:49:12 +0000 Subject: [PATCH] Tighten up tableExists SQL, fix hyperlink to tsearch2 docs. --- includes/DatabasePostgres.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index 50097b89bc..f96d931c53 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -162,7 +162,7 @@ class DatabasePostgres extends Database { print "
  • Checking that tsearch2 is installed in the database \"$wgDBname\"..."; if (! $this->tableExists("pg_ts_cfg", $wgDBts2schema)) { print "FAILED. tsearch2 must be installed in the database \"$wgDBname\"."; - print "Please see 'http://www.devx.com/opensource/Article/21674/0/page/2'>this article"; + print "Please see this article"; print " for instructions or ask on #postgresql on irc.freenode.net
  • \n"; dieout(""); } @@ -657,7 +657,8 @@ class DatabasePostgres extends Database { $etable = preg_replace("/'/", "''", $table); $eschema = preg_replace("/'/", "''", $schema); $SQL = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n " - . "WHERE c.relnamespace = n.oid AND c.relname = '$etable' AND n.nspname = '$eschema'"; + . "WHERE c.relnamespace = n.oid AND c.relname = '$etable' AND n.nspname = '$eschema' " + . "AND c.relkind IN ('r','v')"; $res = $this->query( $SQL ); $count = $res ? pg_num_rows($res) : 0; if ($res) -- 2.20.1