Updated on 2024-06-03 GMT+08:00

ADM_TYPE_ATTRS

ADM_TYPE_ATTRS displays the attributes of the current database object type. By default, only the system administrator can access this view. Common users can access the view only after being authorized. This view exists in the PG_CATALOG and SYS schemas.

Table 1 ADM_TYPE_ATTRS columns

Name

Type

Description

owner

oid

Owner of the type

type_name

name

Data type name

attr_name

name

Column name

attr_type_mod

integer

Type-specific data supplied at the table creation time (for example, the maximum length of a varchar column). This column is used as the third parameter when passing to type-specific input functions and length coercion functions. The value will generally be –1 for types that do not need ATTTYPMOD.

attr_type_owner

oid

Owner of an attribute of this type

attr_type_name

name

Data type attribute name Currently, this column records the type name after conversion.

length

smallint

Number of bytes in the internal representation of the type for a fixed-size type. It is a negative number for a variable-length type.
  • The value -1 indicates a "varlena" type (one that has a length word).
  • The value -2 indicates a null-terminated C string.

precision

integer

Precision of the numeric type

scale

integer

Range of the numeric type

character_set_name

character(1)

Character set name of an attribute (c or n)

attr_no

smallint

Attribute number

inherited

character(1)

Whether the attribute is inherited from the super type (Y or N)

attr_length

integer

Type-specific data supplied at the table creation time (for example, the maximum length of a varchar column). The raw type is not recorded due to kernel implementation.