In PosgtgreSQL the following kinds of user types are available:
Domains are essentially some data types with database constraints applied to them, they map to their base data types' C++ counterparts.
Other user types can be mapped to C++ types, more information on defining a mapped C++ type can be found on respective pages. After a C++ type is defined, it must be mapped to it's PostgreSQL counterpart by specialising CppToUserPg template for the type. C++ types are mapped to PostgreSQL types by their names, so the specialization for CppToUserPg template must have a static constexpr
member of type DBTypeName named postgres_name
.
A connection gets the data types' definitions after connect and uses the definitions to map C++ types to PostgreSQL type oids.