@@ -982,6 +982,15 @@ createTypeCompositeFrom ty = createTypeComposite ty
982982 :: NP (Aliased (TypeExpression schemas)) (RowPG hask))
983983
984984{-|
985+`createDomain` creates a new domain. A domain is essentially a data type
986+with constraints (restrictions on the allowed set of values).
987+
988+Domains are useful for abstracting common constraints on fields
989+into a single location for maintenance. For example, several tables might
990+contain email address columns, all requiring the same `check` constraint
991+to verify the address syntax. Define a domain rather than setting up
992+each table's constraint individually.
993+
985994>>> :{
986995let
987996 createPositive :: Definition (Public '[]) (Public '["positive" ::: 'Typedef 'PGfloat4])