The list of all the queries

System-generated domain CHECK constraint names

Query goal: Find the names of domain CHECK constraints that have been system-generated. Names should follow the same style. If there is a mix of system-generated and user-defined names, then the style is most probably different.
Query type: Problem detection (Each row in the result could represent a flaw in the design)
Query reliability: Unspecified (The query is not used for detecting flaws or the reliability is unknown)
Query license: MIT License
Data source: INFORMATION_SCHEMA only
SQL query: Click on query to copy it

SELECT domain_schema, domain_name, constraint_name
FROM INFORMATION_SCHEMA.domain_constraints
WHERE constraint_name ILIKE domain_name || '_check%' AND
domain_schema NOT IN (SELECT schema_name
FROM INFORMATION_SCHEMA.schemata
WHERE schema_name<>'public' AND
schema_owner='postgres' AND schema_name IS NOT NULL)
ORDER BY domain_schema, domain_name;

Collections where the query belongs to

Collection nameCollection description
Find problems automaticallyQueries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not .

Categories where the query belongs to

Category nameCategory description
DomainsQueries of this category provide information about reusable specifications of column properties.
NamingQueries of this category provide information about the style of naming.

Reference materials for further reading

Reference
https://digikogu.taltech.ee/et/item/05157bb4-763e-4a9d-bc50-2025692b8e1d
https://pgxn.org/dist/constr_name_unif
https://github.com/katrinaibast/constr_name_unif

The list of all the queries