pg_type
The catalog pg_type
stores information about data types. Base types and enum types (scalar types) are created with CREATE TYPE
, and domains with CREATE DOMAIN
. A composite type is automatically created for each table in the database, to represent the row structure of the table. It is also possible to create composite types with CREATE TYPE AS
.
Table pg_type
Columns
Column Type Description |
---|
Row identifier |
Data type name |
The OID of the namespace that contains this type |
Owner of the type |
For a fixed-size type, |
|
|
|
True if the type is a preferred cast target within its |
True if the type is defined, false if this is a placeholder entry for a not-yet-defined type. When |
Character that separates two values of this type when parsing array input. Note that the delimiter is associated with the array element data type, not the array data type. |
If this is a composite type (see |
Subscripting handler function's OID, or zero if this type doesn't support subscripting. Types that are “true” array types have |
If |
If |
Input conversion function (text format) |
Output conversion function (text format) |
Input conversion function (binary format), or zero if none |
Output conversion function (binary format), or zero if none |
Type modifier input function, or zero if type does not support modifiers |
Type modifier output function, or zero to use the standard format |
Custom ANALYZE function, or zero to use the standard function |
|
|
|
If this is a domain (see |
Domains use |
|
|
If |
|
Access privileges; |
pg_type
agree with the way that the compiler will lay out the column in a structure representing a table row.typcategory
. Any future additions to this list will also be upper-case ASCII letters. All other ASCII characters are reserved for user-defined categories.Table typcategory
Codes
Code | Category |
---|---|
A | Array types |
B | Boolean types |
C | Composite types |
D | Date/time types |
E | Enum types |
G | Geometric types |
I | Network address types |
N | Numeric types |
P | Pseudo-types |
R | Range types |
S | String types |
T | Timespan types |
U | User-defined types |
V | Bit-string types |
X | unknown type |