-
Notifications
You must be signed in to change notification settings - Fork 0
Savateykin #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Savateykin #314
Conversation
| WHEN additional_data = '' THEN jsonb_build_array('{}'::jsonb) | ||
| CASE | ||
| WHEN additional_data IS NULL OR additional_data = '' THEN jsonb_build_array('{}'::jsonb) | ||
| --WHEN NOT jsonb_valid(additional_data) THEN jsonb_build_array('{}'::jsonb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убери комментарий
| WHEN additional_data ~ '^\{.*\}$' THEN additional_data::jsonb | ||
| WHEN jsonb_typeof(additional_data::jsonb) = 'array' THEN additional_data::jsonb | ||
| ELSE jsonb_build_array(additional_data::jsonb) | ||
| ELSE jsonb_build_array(additional_data::jsonb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а чем 31 и 32 строчки отличаются по смыслу?
сейчас написано: если массив, то преобразуем в json
иначе преобразуем в массив джейсонов
точно ли это имел в виду?
Применил функцию jsonb_valid()