Informix Error -9659: The server does not support the specified UPDATE operation on JSON documents
Cause and resolution
The server does not support the specified UPDATE operation on JSON documents
Use successive SELECT, DELETE and INSERT operations to update JSON documents
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9659 fires when an in-place UPDATE is attempted on a JSON document in a way the server doesn't support — per the official guidance.
- An unsupported direct UPDATE operation on a JSON document, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use successive SELECT, DELETE, and INSERT operations to update JSON documents instead, per the official guidance.
Examples
Updating a JSON document via SELECT/DELETE/INSERT
SELECT doc FROM json_tab WHERE id = 1 INTO :doc;
-- modify :doc in the application
DELETE FROM json_tab WHERE id = 1;
INSERT INTO json_tab VALUES (1, :doc);
Diagnostic Checks
- Check whether the attempted UPDATE targets a JSON document directly, and replace it with SELECT/DELETE/INSERT.
Related Errors / Related Topics
- -9660 — "The database server operation failed due to an invalid JSON document." A related JSON-document error, on document validity rather than an unsupported UPDATE operation.
A direct UPDATE on a JSON document isn't supported — use SELECT, DELETE, and INSERT instead.