Studio: Error when updating a jsonb[] column set with a default value as '[]'::jsonb #16977
monicakh
started this conversation in
Contribute to Supabase
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug report
Describe the bug
Error when updating a jsonb[] column.
The error states "
null value in column 'additional_items' of relation 'test' violates not-null constraint
". This issue seems to be contradictory since a default value is set for the additional_items column as '[]'::jsonb, which should prevent it from being empty.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Failed to run sql query: null value in column "additional_items" of relation "test" violates not-null constraint
" is thrown, indicating that the additional_items column is treated as null despite the default value being set.Expected behavior
The update operation should succeed without any errors, as the additional_items column has a default value of '[]'::jsonb, ensuring that it is never empty.
Screenshots
System information
Additional context
The error occurs only during updates; inserting data into the table works as expected.
The issue persists even when explicitly providing a non-null value during the update operation.
Beta Was this translation helpful? Give feedback.
All reactions