Hi Gentz,
I'm in a dire need of help, because this bug is killing me for weeks now.
I got a function, and that function has a simple update query in it:
UPDATE app_devices SET device_state = p_values[1], device_updateTs = NOW(),
device_changets = CASE WHEN device_state <> p_values[1] THEN NOW() ELSE device_changets END,
device_alertstate = CASE WHEN device_state <> p_values[1] THEN 0 ELSE device_alertstate END
WHERE device_id=dev_id;
The device_alertstate's default value is 200. update and changets are null by default.
And I constantly face a result when the device_state is updated, changets and updatets are populated, but the device_alertstate remains on the default 200.
As far as I can tell from the second round and forward it works well.
I am simply not able to come up with any reasons for this to happen.
Thank you very much in advance!
Bests,
András