Revision: 1177
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1177&view=rev
Author:   jberanek
Date:     2009-08-24 09:06:29 +0000 (Mon, 24 Aug 2009)

Log Message:
-----------
* Improved/fixed the PostgreSQL sql_table_exists() implementation.

Modified Paths:
--------------
    mrbs/trunk/web/pgsql.inc

Modified: mrbs/trunk/web/pgsql.inc
===================================================================
--- mrbs/trunk/web/pgsql.inc    2009-08-23 19:33:09 UTC (rev 1176)
+++ mrbs/trunk/web/pgsql.inc    2009-08-24 09:06:29 UTC (rev 1177)
@@ -353,10 +353,8 @@
 {
   sql_pgsql_ensure_handle($db_conn);
 
-  $res = sql_pgsql_query1("SELECT table_name FROM information_schema.tables ".
-                          "WHERE table_schema='public' AND ".
-                          "table_type='BASE TABLE' AND ".
-                          "table_name = '".addslashes($table)."'");
+  $res = sql_pgsql_query1("SELECT relname FROM pg_class ".
+                          "WHERE relname = '".addslashes($table)."'");
 
   return ($res == -1) ? FALSE : TRUE;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to