PG_TYPE
PG_TYPE stores information about data types.
Table 1 PG_TYPE columns
Specifies whether to pass a value (true) or a reference (false) when a value of this type is passed internally. typbyval is set to false if the value of typlen is not 1, 2, 4, or 8, because values of this type are always passed by reference of this column. typbyval can be false even if the typlen is passed by a parameter of this column. | ||
typcategory is an arbitrary classification of data types that is used by the parser to determine which implicit casts should be preferred. | ||
The value is true if conversion is performed when data meets conversion rules specified by typcategory. | ||
Whether a type has been defined. It is true if the type is defined, and false if this is a placeholder entry for a not-yet-defined type. When it is false, nothing except the type name, namespace, and OID can be relied on. | ||
Character that separates two values of this type when parsing an 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 typtype), then this column points to the PG_CLASS entry that defines the corresponding table. For a free-standing composite type, the PG_CLASS entry does not represent a table, but it is required for the type's PG_ATTRIBUTE entries to link to. It is 0 for non-composite type. | ||
If typelem is not 0, it identifies another row in PG_TYPE. The current type can be described as an array yielding values of type typelem. A "true" array type has a variable length (typlen = –1), but some fixed-length types (typlen > 0) also have non-zero typelem, for example name and point. If a fixed-length type has a typelem, its internal representation must be a number of values of the typelem data type with no other data. Variable-length array types have a header defined by the array subroutines. | ||
If the value is not 0, the corresponding type record is available in PG_TYPE. | ||
Input conversion function (binary format); 0 for non-input conversion function | ||
output conversion function (binary format); 0 for non-output conversion function | ||
Type modifier input function; 0 if the type does not support modifiers | ||
Type modifier output function; 0 if the type does not support modifiers | ||
Alignment required when storing a value of this type. It applies to storage on disks as well as most representations of the value inside openGauss. When multiple values are stored consecutively, such as in the representation of a complete row on disk, padding is inserted before a data of this type so that it begins on the specified boundary. The alignment reference is the beginning of the first datum in the sequence. Possible values are: | ||
Whether the type has a NOTNULL constraint. Currently, it is used for domains only. | ||
If this is a domain (see typtype), then typbasetype identifies the type that this one is based on. The value is 0 if this type is not a derived type. | ||
Records the typtypmod to be applied to domains' base types by domains (the value is –1 if the base type does not use typmod). This is –1 if this type is not a domain. | ||
Number of array dimensions for a domain that is an array (typbasetype is an array type; the domain's typelem matches the base type's typelem). This is 0 for types other than domains over array types. | ||
Sequence rule for specified types. For details about the value, see the system catalog in PG_COLLATION. (0 if sequencing is not supported) | ||
nodeToString() representation of a default expression for the type if the value is non-null. Currently, this column is only used for domains. | ||
The value is NULL if a type has no associated default value. | ||