The || operator for the jsonb type has a surprising behaviour.Instead of appending the right operand "as is" to the left operand,it has a magic behaviour if the right operand is an array,in which case it will append the items of the array,instead of appending the array itself as a single value.
Suggestions welcome if there is a better way to solve this problem.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных