PostgreSQL automatically names constraints like so:
table_column_constraint
example
users_age_check
table + _ + column + _ + constraint — To name your own constraints, use the following syntax:
CREATE TABLE example(
id SERIAL CONSTRAINT id_check_example CHECK(id > 0)
)
use case - more descriptive constraints, so you know what the issue is