diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index ca966ea..7b46d76 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -323,7 +323,7 @@ // MySQL supports strings as names, PostgreSQL needs identifiers. // Limit to after closing parenthesis to reduce false-positives // Currently only an issue for nextgen-gallery plugin - $pattern = '/\) AS \'([^\'])\'/'; + $pattern = '/\) AS \'([^\']+)\'/'; $sql = preg_replace( $pattern, ') AS "$1"', $sql); } // SELECT elseif( 0 === strpos($sql, 'UPDATE'))