From 501c158f7f916e84a718457c458066810a3ae8ba Mon Sep 17 00:00:00 2001 From: Kirk Mayo Date: Fri, 22 Jun 2012 16:07:12 +1200 Subject: [PATCH] #BUGFIX: Ticket 7533 fixed a bug which I found whilst testing this and amended the README.md --- code/PostgreSQLDatabase.php | 2 ++ docs/README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/PostgreSQLDatabase.php b/code/PostgreSQLDatabase.php index 70b8038..758ce0a 100755 --- a/code/PostgreSQLDatabase.php +++ b/code/PostgreSQLDatabase.php @@ -953,6 +953,8 @@ class PostgreSQLDatabase extends SS_Database { $indexSpec=trim($indexSpec, '()'); $bits=explode(',', $indexSpec); $indexes="\"" . implode("\",\"", $bits) . "\""; + // if some of the indexes have already been quoted then we need to remove the suplus double quotes + $indexes = str_replace('""', '"', $indexes); //One last check: $existing=DB::query("SELECT tablename FROM pg_indexes WHERE indexname='" . strtolower($tableCol) . "';")->first(); diff --git a/docs/README.md b/docs/README.md index e754aca..e1caa79 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # PostgreSQL Database Module -SilverStripe now has tentative support for PostgreSQL ('Postgres'). This available though a module which you can use after completing a successful MySQL installation. +SilverStripe now has tentative support for PostgreSQL ('Postgres') which is available though this module ## Requirements