From 70b7af7142ac86d2319456d0206053e2605e0b4d Mon Sep 17 00:00:00 2001 From: hawk__ Date: Thu, 17 May 2012 20:13:57 +0000 Subject: [PATCH] Added a filter for 'CREATE TABLE IF NOT EXISTS' git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@545542 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pg4wp/driver_pgsql_install.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pg4wp/driver_pgsql_install.php b/pg4wp/driver_pgsql_install.php index 8c81e7f..0151b0a 100644 --- a/pg4wp/driver_pgsql_install.php +++ b/pg4wp/driver_pgsql_install.php @@ -169,6 +169,7 @@ WHERE pg_class.relname='$table_name' AND pg_attribute.attnum>=1 AND NOT pg_attri elseif( 0 === strpos($sql, 'CREATE TABLE')) { $logto = 'CREATE'; + $sql = str_replace( 'CREATE TABLE IF NOT EXISTS ', 'CREATE TABLE ', $sql); $pattern = '/CREATE TABLE [`]?(\w+)[`]?/'; preg_match($pattern, $sql, $matches); $table = $matches[1];