don't list primary and unique indexes under indexes - list them in constraints
authorchriskl <chriskl>
Thu, 8 May 2003 15:25:58 +0000 (15:25 +0000)
committerchriskl <chriskl>
Thu, 8 May 2003 15:25:58 +0000 (15:25 +0000)
classes/database/Postgres.php

index e1fdf715177fe30aa60b659cdd2641b94a66dac4..da5846c41834ba1fa43b588dfac73a99afd11ffc 100755 (executable)
@@ -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.98 2003/05/08 15:14:14 chriskl Exp $
+ * $Id: Postgres.php,v 1.99 2003/05/08 15:25:58 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1204,6 +1204,7 @@ class Postgres extends BaseDB {
                $sql = "SELECT c2.relname, i.indisprimary, i.indisunique, pg_get_indexdef(i.indexrelid)
                        FROM pg_class c, pg_class c2, pg_index i
                        WHERE c.relname = '{$table}' AND c.oid = i.indrelid AND i.indexrelid = c2.oid
+                       AND NOT i.indisprimary AND NOT i.indisunique
                        ORDER BY c2.relname";
 
                return $this->selectSet($sql);