I don't think it's a good idea to create a custom comparison operator for a built-in type (also it wouldn't work in this case anyway), so I think casting pseudorecords to JSONB before comparing them is a better workaround.
Is there anything you'd like reviewers to focus on?
Honestly, a better solution would be to use JSONB over JSON in most cases. So chances of running into this issue are pretty low, but a bug is a bug.
I know it's asking too much, but how would I implement if I just want to track if the json was updated or not, not the actual content. Or only one of the keys in jsonb
What is the purpose of this pull request?
Fixes #209.
What changes did you make? (overview)
I don't think it's a good idea to create a custom comparison operator for a built-in type (also it wouldn't work in this case anyway), so I think casting pseudorecords to JSONB before comparing them is a better workaround.
Is there anything you'd like reviewers to focus on?
Honestly, a better solution would be to use JSONB over JSON in most cases. So chances of running into this issue are pretty low, but a bug is a bug.
Checklist