Within userver a strong typedef can be expressed as an enum class for integral types and as an instance of USERVER_NAMESPACE::utils::StrongTypedef
template for all types. Both of them are supported transparently by the PostgresSQL driver with minor limitations. No additional code required.
The underlying type for a strong typedef must be mapped to a system or a user PostgreSQL data type. Strong typedef type derives nullability from underlying type.
Using USERVER_NAMESPACE::utils::StrongTypedef
example:
Using enum class
example: