-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
WP Version: 6.8.3
PG4WP Version: 3.4.1
Error:
ERROR: syntax error at or near "SET"
LINE 3: WHERE term_id IN (23) SET
^
RAW SQL
UPDATE wp_term_taxonomy
SET description = ( CASE term_id WHEN 23 THEN 'a:2:{s:2:"en";i:21;s:2:"hu";i:1;}' END )
WHERE term_id IN (23)
Actual Rewritten SQL
UPDATE wp_term_taxonomy
SET description = ( CASE term_id WHEN 23 THEN 'a:2:{s:2:"en";i:21;s:2:"hu";i:1;}' END )
WHERE term_id IN (23) SET
The problem is caused by the linebreak before SET (without/instead of a space), created by wp-importer.
driver_pgsql_rewrite.php, line 46.
I suggest replacing this line with
list($sql, $end) = preg_split('/\s+SET\s+/i', $sql, 2);
and line 51 with
list($sql, $end) = preg_split('/\s+VALUES/i', $sql, 2);
Wouldn't make a PR for this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels