cvs: pear /MDB2/MDB2/Driver/Reverse pgsql.php

[email protected] ("Lorenzo Alberton")
Newsgroups php.pear.cvs
Message-ID <cvsquipo1210685847@cvsserver>
quipo		Tue May 13 13:37:27 2008 UTC

  Modified files:              
    /pear/MDB2/MDB2/Driver/Reverse	pgsql.php 
  Log:
  fixed bug #13481: getTableConstraintDefinition() may return incomplete results.
  
  Reverted fix introduced in revision 1.71, since it was wrong, and applied Holger Schletz's patch
  
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Reverse/pgsql.php?r1=1.72&r2=1.73&diff_format=u
Index: pear/MDB2/MDB2/Driver/Reverse/pgsql.php
diff -u pear/MDB2/MDB2/Driver/Reverse/pgsql.php:1.72 pear/MDB2/MDB2/Driver/Reverse/pgsql.php:1.73
--- pear/MDB2/MDB2/Driver/Reverse/pgsql.php:1.72	Wed Mar 26 21:16:02 2008
+++ pear/MDB2/MDB2/Driver/Reverse/pgsql.php	Tue May 13 13:37:27 2008
@@ -43,7 +43,7 @@
 // |          Lorenzo Alberton <[email protected]>                      |
 // +----------------------------------------------------------------------+
 //
-// $Id: pgsql.php,v 1.72 2008/03/26 21:16:02 quipo Exp $
+// $Id: pgsql.php,v 1.73 2008/05/13 13:37:27 quipo Exp $
 
 require_once 'MDB2/Driver/Reverse/Common.php';
 
@@ -340,8 +340,7 @@
                   LEFT JOIN pg_class t  ON c.conrelid  = t.oid
                   LEFT JOIN pg_attribute a ON a.attrelid = t.oid AND a.attnum = ANY(c.conkey)
                   WHERE c.conname = %s
-                   AND t.relname = ' . $db->quote($definition['references']['table'], 'text');
-        $constraint_name_mdb2 = $db->getIndexName($constraint_name);
+                   AND t.relname = ' . $db->quote($table, 'text');
         $fields = $db->queryCol(sprintf($query, $db->quote($constraint_name_mdb2, 'text')), null);
         if (PEAR::isError($fields)) {
             return $fields;
@@ -361,7 +360,6 @@
                    LEFT JOIN pg_attribute a ON a.attrelid = t.oid AND a.attnum = ANY(c.confkey)
                        WHERE c.conname = %s
                          AND t.relname = ' . $db->quote($definition['references']['table'], 'text');
-            $constraint_name_mdb2 = $db->getIndexName($constraint_name);
             $foreign_fields = $db->queryCol(sprintf($query, $db->quote($constraint_name_mdb2, 'text')), null);
             if (PEAR::isError($foreign_fields)) {
                 return $foreign_fields;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.