Struct postgres::types::Type[][src]

pub struct Type(_);
Expand description

A Postgres type.

Implementations

BOOL - boolean, 'true'/'false'

BYTEA - variable-length string, binary values escaped

CHAR - single character

NAME - 63-byte type for storing system identifiers

INT8 - ~18 digit integer, 8-byte storage

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

INT2VECTOR - array of int2, used in system tables

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

REGPROC - registered procedure

TEXT - variable-length string, no limit specified

OID - object identifier(oid), maximum 4 billion

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

XID - transaction id

CID - command identifier type, sequence in transaction id

OIDVECTOR - array of oids, used in system tables

PG_DDL_COMMAND - internal type for passing CollectedCommand

JSON - JSON stored as text

XML - XML content

XML[]

PG_NODE_TREE - string representing an internal node tree

JSON[]

TABLE_AM_HANDLER

XID8[]

INDEX_AM_HANDLER - pseudo-type for the result of an index AM handler function

POINT - geometric point '(x, y)'

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

PATH - geometric path '(pt1,…)'

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

POLYGON - geometric polygon '(pt1,…)'

LINE - geometric line

LINE[]

CIDR - network IP address/netmask, network address

CIDR[]

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

FLOAT8 - double-precision floating point number, 8-byte storage

UNKNOWN - pseudo-type representing an undetermined type

CIRCLE - geometric circle '(center,radius)'

CIRCLE[]

MACADDR8 - XX:XX:XX:XX:XX:XX:XX:XX, MAC address

MACADDR8[]

MONEY - monetary amounts, $d,ddd.cc

MONEY[]

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

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

BOOL[]

BYTEA[]

CHAR[]

NAME[]

INT2[]

INT2VECTOR[]

INT4[]

REGPROC[]

TEXT[]

TID[]

XID[]

CID[]

OIDVECTOR[]

BPCHAR[]

VARCHAR[]

INT8[]

POINT[]

LSEG[]

PATH[]

BOX[]

FLOAT4[]

FLOAT8[]

POLYGON[]

OID[]

ACLITEM - access control list

ACLITEM[]

MACADDR[]

INET[]

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

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

DATE - date

TIME - time of day

TIMESTAMP - date and time

TIMESTAMP[]

DATE[]

TIME[]

TIMESTAMPTZ - date and time with time zone

TIMESTAMPTZ[]

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

INTERVAL[]

NUMERIC[]

CSTRING[]

TIMETZ - time of day with time zone

TIMETZ[]

BIT - fixed-length bit string

BIT[]

VARBIT - variable-length bit string

VARBIT[]

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

REFCURSOR - reference to cursor (portal name)

REFCURSOR[]

REGPROCEDURE - registered procedure (with args)

REGOPER - registered operator

REGOPERATOR - registered operator (with args)

REGCLASS - registered class

REGTYPE - registered type

REGPROCEDURE[]

REGOPER[]

REGOPERATOR[]

REGCLASS[]

REGTYPE[]

RECORD - pseudo-type representing any composite type

CSTRING - C-style string

ANY - pseudo-type representing any type

ANYARRAY - pseudo-type representing a polymorphic array type

VOID - pseudo-type for the result of a function with no real result

TRIGGER - pseudo-type for the result of a trigger function

LANGUAGE_HANDLER - pseudo-type for the result of a language handler function

INTERNAL - pseudo-type representing an internal data structure

ANYELEMENT - pseudo-type representing a polymorphic base type

RECORD[]

ANYNONARRAY - pseudo-type representing a polymorphic base type that is not an array

TXID_SNAPSHOT[]

UUID - UUID datatype

UUID[]

TXID_SNAPSHOT - txid snapshot

FDW_HANDLER - pseudo-type for the result of an FDW handler function

PG_LSN - PostgreSQL LSN datatype

PG_LSN[]

TSM_HANDLER - pseudo-type for the result of a tablesample method function

PG_NDISTINCT - multivariate ndistinct coefficients

PG_DEPENDENCIES - multivariate dependencies

ANYENUM - pseudo-type representing a polymorphic base type that is an enum

TSVECTOR - text representation for text search

TSQUERY - query representation for text search

GTSVECTOR - GiST index internal text representation for text search

TSVECTOR[]

GTSVECTOR[]

TSQUERY[]

REGCONFIG - registered text search configuration

REGCONFIG[]

REGDICTIONARY - registered text search dictionary

REGDICTIONARY[]

JSONB - Binary JSON

JSONB[]

ANYRANGE - pseudo-type representing a range over a polymorphic base type

EVENT_TRIGGER - pseudo-type for the result of an event trigger function

INT4RANGE - range of integers

INT4RANGE[]

NUMRANGE - range of numerics

NUMRANGE[]

TSRANGE - range of timestamps without time zone

TSRANGE[]

TSTZRANGE - range of timestamps with time zone

TSTZRANGE[]

DATERANGE - range of dates

DATERANGE[]

INT8RANGE - range of bigints

INT8RANGE[]

JSONPATH - JSON path

JSONPATH[]

REGNAMESPACE - registered namespace

REGNAMESPACE[]

REGROLE - registered role

REGROLE[]

REGCOLLATION - registered collation

REGCOLLATION[]

PG_MCV_LIST - multivariate MCV list

PG_SNAPSHOT - snapshot

PG_SNAPSHOT[]

XID8 - full transaction id

ANYCOMPATIBLE - pseudo-type representing a polymorphic common type

ANYCOMPATIBLEARRAY - pseudo-type representing an array of polymorphic common type elements

ANYCOMPATIBLENONARRAY - pseudo-type representing a polymorphic common type that is not an array

ANYCOMPATIBLERANGE - pseudo-type representing a range over a polymorphic common type

Creates a new Type.

Returns the Type corresponding to the provided Oid if it corresponds to a built-in type.

Returns the OID of the Type.

Returns the kind of this type.

Returns the schema of this type.

Returns the name of this type.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.