
They are equivalent to the enum types in a number of programming languages. The user can access the component fields from SQL queries.Įnumerated (Enum) types are data types that are comprised of a static, predefined set of values with a specific order. A value of a composite type is a row or record of field values. A composite type is simply a list of base types with associated field names. For each scalar type, a corresponding array type is automatically created that can hold variable-size arrays of that scalar type.Ĭomposite types, or row types, are created whenever the user creates a table it's also possible to define a "stand-alone" composite type with no associated table. Base types are further subdivided into scalar and array types. PostgreSQL can only operate on such types through functions provided by the user and only understands the behavior of such types to the extent that the user describes them. They generally correspond to what are often known as abstract data types. (Because tables have associated data types, the type name must also be distinct from the name of any existing table in the same schema.) Click -> Type to open an object list for Type.īase types are those, like int4, that are implemented below the level of the SQL language (typically in a low-level language such as C). The type name must be distinct from the name of any existing type or domain in the same schema.

Otherwise it is created in the current schema. If a schema name is given then the type is created in the specified schema.

Type registers a new data type for use in the current database.
