Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.2

Bug #1549 getSpecialQuery() method problem
Submitted: 2004-06-03 06:52 UTC
From: iwakiri Assigned: danielc
Status: Closed Package: DB
PHP Version: 5CVS-2004-06-03 (dev) OS: *nix
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 6 + 40 = ?

 
 [2004-06-03 06:52 UTC] iwakiri
Description: ------------ getSpecialQuery() can't access `PostgreSQL CORE TABLE'. Those tables are sql_* . (added PostgreSQL version 7.4.2) This problem occurs PostgreSQL 7.4.2 or later. I want you to try patch of the following. Index: pear/DB/DB/pgsql.php =================================================================== RCS file: /repository/pear/DB/DB/pgsql.php,v retrieving revision 1.75 diff -u -u -r1.75 pgsql.php --- pear/DB/DB/pgsql.php 7 Apr 2004 05:12:28 -0000 1.75 +++ pear/DB/DB/pgsql.php 3 Jun 2004 06:48:15 -0000 @@ -808,7 +808,7 @@ WHERE c.relkind = 'r' AND not exists (select 1 from pg_views where viewname = c.relname) AND not exists (select 1 from pg_user where usesysid = c.relowner) - AND c.relname !~ '^pg_'"; + AND c.relname !~ '^(pg_|sql_)'"; case 'views': // Table cols: viewname | viewowner | definition return 'SELECT viewname FROM pg_views';

Comments

 [2004-06-17 15:43 UTC] jpbarrette at savoirfairelinux dot net
in fact you should change the first c.relname !~ '^pg_' to be changed to '^(pg_|sql_)' not the second.
 [2004-06-19 03:00 UTC] iwakiri
Thank you for comment. previus patch is wrong. Index: pear/DB/DB/pgsql.php =================================================================== RCS file: /repository/pear/DB/DB/pgsql.php,v retrieving revision 1.75 diff -u -r1.75 pgsql.php --- pear/DB/DB/pgsql.php 7 Apr 2004 05:12:28 -0000 1.75 +++ pear/DB/DB/pgsql.php 19 Jun 2004 03:04:40 -0000 @@ -801,7 +801,7 @@ FROM pg_class c, pg_user u WHERE c.relowner = u.usesysid AND c.relkind = 'r' AND not exists (select 1 from pg_views where viewname = c.relname) - AND c.relname !~ '^pg_' + AND c.relname !~ '^(pg_|sql_)' UNION SELECT c.relname as \"Name\" FROM pg_class c
 [2004-06-25 18:53 UTC] danielc
Fixed in CVS.