diff --git includes/database/pgsql/schema.inc includes/database/pgsql/schema.inc
index 4ceddcb..355bcaa 100644
--- includes/database/pgsql/schema.inc
+++ includes/database/pgsql/schema.inc
@@ -416,9 +416,17 @@ class DatabaseSchema_pgsql extends DatabaseSchema {
   }
 
   public function indexExists($table, $name) {
-    // Details http://www.postgresql.org/docs/8.3/interactive/view-pg-indexes.html
-    $index_name = '{' . $table . '}_' . $name . '_idx';
-    return (bool) $this->connection->query("SELECT 1 FROM pg_indexes WHERE indexname = '$index_name'")->fetchField();
+    if ($name == 'PRIMARY') {
+      // Add compatibility with MySQL's ability to look up the primary key.
+      // The PK is not stored as an index but as a constraint.
+      $pkey = '{' . $table . '}_pkey';
+      return (bool) db_query("SELECT 1 FROM pg_constraint WHERE conname = '$pkey' AND contype = 'p'")->fetchField();
+    }
+    else {
+      // Details http://www.postgresql.org/docs/8.3/interactive/view-pg-indexes.html
+      $index_name = '{' . $table . '}_' . $name . '_idx';
+      return (bool) $this->connection->query("SELECT 1 FROM pg_indexes WHERE indexname = '$index_name'")->fetchField();
+    }
   }
 
   /**
diff --git modules/simpletest/tests/database_test.test modules/simpletest/tests/database_test.test
index ebd6ce9..923487b 100644
--- modules/simpletest/tests/database_test.test
+++ modules/simpletest/tests/database_test.test
@@ -2731,6 +2731,9 @@ class DatabaseRegressionTestCase extends DatabaseTestCase {
   function testDBIndexExists() {
     $this->assertIdentical(TRUE, db_index_exists('node', 'node_created'), t('Returns true for existent index.'));
     $this->assertIdentical(FALSE, db_index_exists('node', 'nosuchindex'), t('Returns false for nonexistent index.'));
+
+    //  Test db_index_exists() with PRIMARY.
+    $this->assertIdentical(TRUE, db_index_exists('node', 'PRIMARY'), t('Returns true for existing primary key.'));
   }
 }
 
