Skip to content

INSERT SET -> INSERT VALUES #158

@Yogurt4

Description

@Yogurt4

WP Version: 6.8.3
PG4WP Version: 3.4.1

Error:

----> ERROR:  syntax error at or near "SET"
LINE 2: SET "key" = 'activation_redirect', "value" = 'b:1;', "expira...
        ^

RAW SQL

INSERT INTO wp_aioseo_cache
SET `key` = 'activation_redirect', `value` = 'b:1;', `expiration` = '2025-10-07 14:17:27', `created` = '2025-10-07 14:16:57', `updated` = '2025-10-07 14:16:57'
ON DUPLICATE KEY UPDATE `value` = 'b:1;', `expiration` = '2025-10-07 14:17:27', `updated` = '2025-10-07 14:16:57'

Expected Rewritten SQL

INSERT INTO wp_aioseo_cache ("key", "expiration", "created", "updated")
VALUES ('activation_redirect', 'b:1;', '2025-10-07 14:17:27', '2025-10-07 14:16:57', '2025-10-07 14:16:57')
ON CONFLICT ("value") DO UPDATE SET "value" = EXCLUDED."value", "expiration" = EXCLUDED."expiration", "updated" = EXCLUDED."updated" RETURNING * VALUES

Actual Rewritten SQL

 INSERT INTO wp_aioseo_cache
SET "key" = 'activation_redirect', "value" = 'b:1;', "expiration" = '2025-10-07 14:17:27', "created" = '2025-10-07 14:16:57', "updated" = '2025-10-07 14:16:57' ON CONFLICT ("value") DO UPDATE SET "value" = EXCLUDED."value", "expiration" = EXCLUDED."expiration", "updated" = EXCLUDED."updated" RETURNING * VALUES

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions