You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the impementation of ToJsonb interface does not consider timezone.
One example:
set TimeZone to 'America/New_York';
select to_jsonb('2024-01-01 00:00:00'::timestamptz);
# expected (DST)
"2024-01-01T00:00:00-05:00"
# RW's output
"2024-01-01T00:00:00+00:00"
The mismatch was introduced when we implement ToJsonb interface.
The fix is simple. We can simply implement the new function with #[captured_context(TIME_ZONE)] and without large modification.
The problem is back compatibility. As the old implementation and the new implementation shared the same signature, it would be hard to distinguish. If there were old data using the old implementation and also the data executed with the new implementation, inconsistency may emerge.
Two possible solution:
If we find the running Fragment's version is older than a release version, we throw errors and ask users to recreate the MV.
Add new singnatures like to_jsonb1jsonb_agg1 and jsonb_object_agg1. Newly created MV will be always binded to the new singnatures.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently, the impementation of
ToJsonb
interface does not consider timezone.One example:
The mismatch was introduced when we implement
ToJsonb
interface.The fix is simple. We can simply implement the new function with
#[captured_context(TIME_ZONE)]
and without large modification.The problem is back compatibility. As the old implementation and the new implementation shared the same signature, it would be hard to distinguish. If there were old data using the old implementation and also the data executed with the new implementation, inconsistency may emerge.
Two possible solution:
to_jsonb1
jsonb_agg1
andjsonb_object_agg1
. Newly created MV will be always binded to the new singnatures.The text was updated successfully, but these errors were encountered: