pub struct Column {Show 17 fields
pub name: String,
pub ty: u32,
pub typmod: i32,
pub ndims: i16,
pub collation: u32,
pub not_null: bool,
pub not_null_invalid: bool,
pub has_default: bool,
pub identity: u8,
pub generated: u8,
pub dropped: bool,
pub stat_target: Option<i16>,
pub storage: u8,
pub compression: u8,
pub options: Vec<String>,
pub local: bool,
pub inhcount: i16,
}Expand description
A column of a relation, one row of pg_attribute with a positive attnum.
Fields§
§name: StringThe name.
ty: u32The OID of the type.
typmod: i32The type modifier, or -1.
ndims: i16The number of array dimensions that the statement gives, attndims.
collation: u32The OID of the collation, or 0.
not_null: boolattnotnull.
not_null_invalid: boolTrue when attnotnull comes from a NOT VALID not-null constraint, as attnullability is ATTNULLABLE_INVALID. The new rows cannot have a null in the column, but the rows from before the constraint can.
has_default: boolatthasdef.
identity: u8attidentity: a for GENERATED ALWAYS, d for GENERATED BY DEFAULT, or 0 for a column that is not an identity column.
generated: u8attgenerated: s for a stored generated column, or 0 for a column that is not generated. The default of the column is its generation expression.
dropped: boolattisdropped. A dropped column keeps its place, so the later columns keep their numbers, but it has no name that a query can use and no type.
stat_target: Option<i16>attstattarget: the statistics target of SET STATISTICS, or None for the default.
storage: u8attstorage of STORAGE or SET STORAGE, or 0 for the storage of the type.
compression: u8attcompression: p for pglz, l for lz4, or 0 for the default method.
options: Vec<String>attoptions: each option as name=value.
local: boolattislocal: false for a column that only a parent table gives.
inhcount: i16attinhcount: the number of parent tables that give the column.