Skip to content

Commit

Permalink
Fixed DataSync crashing when an UPDATE query is executed that doesn't…
Browse files Browse the repository at this point in the history
… change any values
  • Loading branch information
mpscholten committed Jan 30, 2023
1 parent a0a4724 commit e31d7b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IHP/DataSync/ChangeNotifications.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ createNotificationFunction table = [i|
BEGIN
CASE TG_OP
WHEN 'UPDATE' THEN
SELECT json_agg(row_to_json(t))
SELECT coalesce(json_agg(row_to_json(t)), '[]'::json)
FROM (
SELECT pre.key AS "col", post.value AS "new"
FROM jsonb_each(to_jsonb(OLD)) AS pre
Expand Down

0 comments on commit e31d7b8

Please sign in to comment.