diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-01 11:30:37 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-01 11:30:37 +0000 |
commit | 13704b8f628af43c5bd1c404cb4eb2ef4d550401 (patch) | |
tree | 0108353e4b66e5791fcd9c5c874a4da5a916209a /includes/database/pgsql | |
parent | 74e94b7e019d29bb58928df0b5b5de8ec3651359 (diff) | |
download | brdo-13704b8f628af43c5bd1c404cb4eb2ef4d550401.tar.gz brdo-13704b8f628af43c5bd1c404cb4eb2ef4d550401.tar.bz2 |
- Patch #722912 by andypost: db_index_exists() must conform schemaAPI indexExists().
Diffstat (limited to 'includes/database/pgsql')
-rw-r--r-- | includes/database/pgsql/schema.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/database/pgsql/schema.inc b/includes/database/pgsql/schema.inc index b7ab95f75..679efbde8 100644 --- a/includes/database/pgsql/schema.inc +++ b/includes/database/pgsql/schema.inc @@ -375,8 +375,9 @@ 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 $this->connection->query("SELECT 1 FROM pg_indexes WHERE indexname = '$index_name'")->fetchField(); + return (bool) $this->connection->query("SELECT 1 FROM pg_indexes WHERE indexname = '$index_name'")->fetchField(); } /** |