Enum postgres::types::Type [] [src]

pub enum Type {
    Bool,
    Bytea,
    Char,
    Name,
    Int8,
    Int2,
    Int2Vector,
    Int4,
    Regproc,
    Text,
    Oid,
    Tid,
    Xid,
    Cid,
    OidVector,
    PgType,
    PgAttribute,
    PgProc,
    PgClass,
    Json,
    Xml,
    XmlArray,
    PgNodeTree,
    JsonArray,
    Smgr,
    Point,
    Lseg,
    Path,
    Box,
    Polygon,
    Line,
    LineArray,
    Cidr,
    CidrArray,
    Float4,
    Float8,
    Abstime,
    Reltime,
    Tinterval,
    Unknown,
    Circle,
    CircleArray,
    Money,
    MoneyArray,
    Macaddr,
    Inet,
    BoolArray,
    ByteaArray,
    CharArray,
    NameArray,
    Int2Array,
    Int2VectorArray,
    Int4Array,
    RegprocArray,
    TextArray,
    TidArray,
    XidArray,
    CidArray,
    OidVectorArray,
    BpcharArray,
    VarcharArray,
    Int8Array,
    PointArray,
    LsegArray,
    PathArray,
    BoxArray,
    Float4Array,
    Float8Array,
    AbstimeArray,
    ReltimeArray,
    TintervalArray,
    PolygonArray,
    OidArray,
    Aclitem,
    AclitemArray,
    MacaddrArray,
    InetArray,
    Bpchar,
    Varchar,
    Date,
    Time,
    Timestamp,
    TimestampArray,
    DateArray,
    TimeArray,
    TimestampTZ,
    TimestampTZArray,
    Interval,
    IntervalArray,
    NumericArray,
    CstringArray,
    Timetz,
    TimetzArray,
    Bit,
    BitArray,
    Varbit,
    VarbitArray,
    Numeric,
    Refcursor,
    RefcursorArray,
    Regprocedure,
    Regoper,
    Regoperator,
    Regclass,
    Regtype,
    RegprocedureArray,
    RegoperArray,
    RegoperatorArray,
    RegclassArray,
    RegtypeArray,
    Record,
    Cstring,
    Any,
    AnyArray,
    Void,
    Trigger,
    LanguageHandler,
    Internal,
    Opaque,
    Anyelement,
    RecordArray,
    Anynonarray,
    TxidSnapshotArray,
    Uuid,
    TxidSnapshot,
    UuidArray,
    FdwHandler,
    PgLsn,
    PgLsnArray,
    Anyenum,
    Tsvector,
    Tsquery,
    Gtsvector,
    TsvectorArray,
    GtsvectorArray,
    TsqueryArray,
    Regconfig,
    RegconfigArray,
    Regdictionary,
    RegdictionaryArray,
    Jsonb,
    Anyrange,
    JsonbArray,
    Int4Range,
    Int4RangeArray,
    NumRange,
    NumRangeArray,
    TsRange,
    TsRangeArray,
    TstzRange,
    TstzRangeArray,
    DateRange,
    DateRangeArray,
    Int8Range,
    Int8RangeArray,
    EventTrigger,
    Other(Box<Other>),
}

A Postgres type.

Variants

Bool

BOOL - boolean, 'true'/'false'

Bytea

BYTEA - variable-length string, binary values escaped

Char

"char" - single character

Name

NAME - 63-byte type for storing system identifiers

Int8

INT8/BIGINT - ~18 digit integer, 8-byte storage

Int2

INT2/SMALLINT - -32 thousand to 32 thousand, 2-byte storage

Int2Vector

INT2VECTOR - array of int2, used in system tables

Int4

INT4/INT - -2 billion to 2 billion integer, 4-byte storage

Regproc

REGPROC - registered procedure

Text

TEXT - variable-length string, no limit specified

Oid

OID - object identifier(oid), maximum 4 billion

Tid

TID - (block, offset), physical location of tuple

Xid

XID - transaction id

Cid

CID - command identifier type, sequence in transaction id

OidVector

OIDVECTOR - array of oids, used in system tables

PgType

PG_TYPE

PgAttribute

PG_ATTRIBUTE

PgProc

PG_PROC

PgClass

PG_CLASS

Json

JSON

Xml

XML - XML content

XmlArray

XML[]

PgNodeTree

PG_NODE_TREE - string representing an internal node tree

JsonArray

JSON[]

Smgr

SMGR - storage manager

Point

POINT - geometric point '(x, y)'

Lseg

LSEG - geometric line segment '(pt1,pt2)'

Path

PATH - geometric path '(pt1,...)'

Box

BOX - geometric box '(lower left,upper right)'

Polygon

POLYGON - geometric polygon '(pt1,...)'

Line

LINE - geometric line

LineArray

LINE[]

Cidr

CIDR - network IP address/netmask, network address

CidrArray

CIDR[]

Float4

FLOAT4/REAL - single-precision floating point number, 4-byte storage

Float8

FLOAT8/DOUBLE PRECISION - double-precision floating point number, 8-byte storage

Abstime

ABSTIME - absolute, limited-range date and time (Unix system time)

Reltime

RELTIME - relative, limited-range date and time (Unix delta time)

Tinterval

TINTERVAL - (abstime,abstime), time interval

Unknown

UNKNOWN

Circle

CIRCLE - geometric circle '(center,radius)'

CircleArray

CIRCLE[]

Money

MONEY - monetary amounts, $d,ddd.cc

MoneyArray

MONEY[]

Macaddr

MACADDR - XX:XX:XX:XX:XX:XX, MAC address

Inet

INET - IP address/netmask, host address, netmask optional

BoolArray

BOOL[]

ByteaArray

BYTEA[]

CharArray

"char"[]

NameArray

NAME[]

Int2Array

INT2[]

Int2VectorArray

INT2VECTOR[]

Int4Array

INT4[]

RegprocArray

REGPROC[]

TextArray

TEXT[]

TidArray

TID[]

XidArray

XID[]

CidArray

CID[]

OidVectorArray

OIDVECTOR[]

BpcharArray

BPCHAR[]

VarcharArray

VARCHAR[]

Int8Array

INT8[]

PointArray

POINT[]

LsegArray

LSEG[]

PathArray

PATH[]

BoxArray

BOX[]

Float4Array

FLOAT4[]

Float8Array

FLOAT8[]

AbstimeArray

ABSTIME[]

ReltimeArray

RELTIME[]

TintervalArray

TINTERVAL[]

PolygonArray

POLYGON[]

OidArray

OID[]

Aclitem

ACLITEM - access control list

AclitemArray

ACLITEM[]

MacaddrArray

MACADDR[]

InetArray

INET[]

Bpchar

BPCHAR - char(length), blank-padded string, fixed storage length

Varchar

VARCHAR - varchar(length), non-blank-padded string, variable storage length

Date

DATE - date

Time

TIME - time of day

Timestamp

TIMESTAMP - date and time

TimestampArray

TIMESTAMP[]

DateArray

DATE[]

TimeArray

TIME[]

TimestampTZ

TIMESTAMPTZ - date and time with time zone

TimestampTZArray

TIMESTAMPTZ[]

Interval

INTERVAL - @ <number> <units>, time interval

IntervalArray

INTERVAL[]

NumericArray

NUMERIC[]

CstringArray

CSTRING[]

Timetz

TIMETZ - time of day with time zone

TimetzArray

TIMETZ[]

Bit

BIT - fixed-length bit string

BitArray

BIT[]

Varbit

VARBIT - variable-length bit string

VarbitArray

VARBIT[]

Numeric

NUMERIC - numeric(precision, decimal), arbitrary precision number

Refcursor

REFCURSOR - reference to cursor (portal name)

RefcursorArray

REFCURSOR[]

Regprocedure

REGPROCEDURE - registered procedure (with args)

Regoper

REGOPER - registered operator

Regoperator

REGOPERATOR - registered operator (with args)

Regclass

REGCLASS - registered class

Regtype

REGTYPE - registered type

RegprocedureArray

REGPROCEDURE[]

RegoperArray

REGOPER[]

RegoperatorArray

REGOPERATOR[]

RegclassArray

REGCLASS[]

RegtypeArray

REGTYPE[]

Record

RECORD

Cstring

CSTRING

Any

ANY

AnyArray

ANY[]

Void

VOID

Trigger

TRIGGER

LanguageHandler

LANGUAGE_HANDLER

Internal

INTERNAL

Opaque

OPAQUE

Anyelement

ANYELEMENT

RecordArray

RECORD[]

Anynonarray

ANYNONARRAY

TxidSnapshotArray

TXID_SNAPSHOT[]

Uuid

UUID - UUID datatype

TxidSnapshot

TXID_SNAPSHOT - txid snapshot

UuidArray

UUID[]

FdwHandler

FDW_HANDLER

PgLsn

PG_LSN - PostgreSQL LSN datatype

PgLsnArray

PG_LSN[]

Anyenum

ANYENUM

Tsvector

TSVECTOR - text representation for text search

Tsquery

TSQUERY - query representation for text search

Gtsvector

GTSVECTOR - GiST index internal text representation for text search

TsvectorArray

TSVECTOR[]

GtsvectorArray

GTSVECTOR[]

TsqueryArray

TSQUERY[]

Regconfig

REGCONFIG - registered text search configuration

RegconfigArray

REGCONFIG[]

Regdictionary

REGDICTIONARY - registered text search dictionary

RegdictionaryArray

REGDICTIONARY[]

Jsonb

JSONB

Anyrange

ANYRANGE

JsonbArray

JSONB[]

Int4Range

INT4RANGE - range of integers

Int4RangeArray

INT4RANGE[]

NumRange

NUMRANGE - range of numerics

NumRangeArray

NUMRANGE[]

TsRange

TSRANGE - range of timestamps without time zone

TsRangeArray

TSRANGE[]

TstzRange

TSTZRANGE - range of timestamps with time zone

TstzRangeArray

TSTZRANGE[]

DateRange

DATERANGE - range of dates

DateRangeArray

DATERANGE[]

Int8Range

INT8RANGE - range of bigints

Int8RangeArray

INT8RANGE[]

EventTrigger

EVENT_TRIGGER

Other(Box<Other>)

An unknown type.

Methods

impl Type
[src]

fn from_oid(oid: Oid) -> Option<Type>

Creates a Type from an OID.

If the OID is unknown, None is returned.

fn to_oid(&self) -> Oid

Returns the OID of the Type.

Deprecated

Use oid instead.

fn oid(&self) -> Oid

Returns the OID of the Type.

fn kind(&self) -> &Kind

The kind of this type.

Trait Implementations

impl Clone for Type
[src]

fn clone(&self) -> Type

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Eq for Type
[src]

impl PartialEq for Type
[src]

fn eq(&self, __arg_0: &Type) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Type) -> bool

This method tests for !=.

impl Debug for Type
[src]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.