[][src]Struct postgres_parser::sys::ColumnDef

#[repr(C)]pub struct ColumnDef {
    pub type_: NodeTag,
    pub colname: *mut c_char,
    pub typeName: *mut TypeName,
    pub inhcount: c_int,
    pub is_local: bool,
    pub is_not_null: bool,
    pub is_from_type: bool,
    pub storage: c_char,
    pub raw_default: *mut Node,
    pub cooked_default: *mut Node,
    pub identity: c_char,
    pub identitySequence: *mut RangeVar,
    pub generated: c_char,
    pub collClause: *mut CollateClause,
    pub collOid: Oid,
    pub constraints: *mut List,
    pub fdwoptions: *mut List,
    pub location: c_int,
}

ColumnDef column definition (used in various creates)

If the column has a default value, we may have the value expression in either "raw" form (an untransformed parse tree) or "cooked" form (a postparseanalysis, executable expression tree), depending on how this ColumnDef node was created (by parsing, or by inheritance from an existing relation). We should never have both in the same node!

Similarly, we may have a COLLATE specification in either raw form (represented as a CollateClause with arg==NULL) or cooked form (the collation's OID).

The constraints list may contain a CONSTR_DEFAULT item in a raw parsetree produced by gram.y, but transformCreateStmt will remove the item and set raw_default instead. CONSTR_DEFAULT items should not appear in any subsequent processing.

Fields

type_: NodeTagcolname: *mut c_chartypeName: *mut TypeName

name of column

inhcount: c_int

type of column

is_local: bool

number of times column is inherited

is_not_null: bool

column has local (noninherited) def'n

is_from_type: bool

NOT NULL constraint specified?

storage: c_char

column definition came from table type

raw_default: *mut Node

attstorage setting, or 0 for default

cooked_default: *mut Node

default value (untransformed parse tree)

identity: c_char

default value (transformed expr tree)

identitySequence: *mut RangeVar

attidentity setting

generated: c_char

to store identity sequence name for ALTER TABLE ... ADD COLUMN

collClause: *mut CollateClause

attgenerated setting

collOid: Oid

untransformed COLLATE spec, if any

constraints: *mut List

collation OID (InvalidOid if not set)

fdwoptions: *mut List

other constraints on column

location: c_int

percolumn FDW options

Trait Implementations

impl Debug for ColumnDef[src]

impl Default for ColumnDef[src]

impl Eq for ColumnDef[src]

impl Hash for ColumnDef[src]

impl PartialEq<ColumnDef> for ColumnDef[src]

impl StructuralEq for ColumnDef[src]

impl StructuralPartialEq for ColumnDef[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.