mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-06-25 09:21:44 +02:00
Added a handle for converting CAST(... AS CHAR) to CAST(... AS TEXT) (Problem pointed out by Aart Jan)
git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@542064 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
@ -201,6 +201,9 @@
|
||||
$sql = preg_replace( $pattern, 'SELECT COUNT($1) $2', $sql);
|
||||
}
|
||||
|
||||
// Handle CAST( ... AS CHAR)
|
||||
$sql = preg_replace( '/CAST\((.+) AS CHAR\)/', 'CAST($1 AS TEXT)', $sql);
|
||||
|
||||
// Handle COUNT(*)...ORDER BY...
|
||||
$sql = preg_replace( '/COUNT(.+)ORDER BY.+/', 'COUNT$1', $sql);
|
||||
|
||||
|
Reference in New Issue
Block a user