postgres_types

Struct Type

Source
pub struct Type(/* private fields */);
Expand description

A Postgres type.

Implementations§

Source§

impl Type

Source

pub const BOOL: Type = _

BOOL - boolean, 'true'/'false'

Source

pub const BYTEA: Type = _

BYTEA - variable-length string, binary values escaped

Source

pub const CHAR: Type = _

CHAR - single character

Source

pub const NAME: Type = _

NAME - 63-byte type for storing system identifiers

Source

pub const INT8: Type = _

INT8 - ~18 digit integer, 8-byte storage

Source

pub const INT2: Type = _

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

Source

pub const INT2_VECTOR: Type = _

INT2VECTOR - array of int2, used in system tables

Source

pub const INT4: Type = _

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

Source

pub const REGPROC: Type = _

REGPROC - registered procedure

Source

pub const TEXT: Type = _

TEXT - variable-length string, no limit specified

Source

pub const OID: Type = _

OID - object identifier(oid), maximum 4 billion

Source

pub const TID: Type = _

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

Source

pub const XID: Type = _

XID - transaction id

Source

pub const CID: Type = _

CID - command identifier type, sequence in transaction id

Source

pub const OID_VECTOR: Type = _

OIDVECTOR - array of oids, used in system tables

Source

pub const PG_DDL_COMMAND: Type = _

PG_DDL_COMMAND - internal type for passing CollectedCommand

Source

pub const JSON: Type = _

JSON - JSON stored as text

Source

pub const XML: Type = _

XML - XML content

Source

pub const XML_ARRAY: Type = _

XML[]

Source

pub const PG_NODE_TREE: Type = _

PG_NODE_TREE - string representing an internal node tree

Source

pub const JSON_ARRAY: Type = _

JSON[]

Source

pub const TABLE_AM_HANDLER: Type = _

TABLE_AM_HANDLER

Source

pub const XID8_ARRAY: Type = _

XID8[]

Source

pub const INDEX_AM_HANDLER: Type = _

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

Source

pub const POINT: Type = _

POINT - geometric point '(x, y)'

Source

pub const LSEG: Type = _

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

Source

pub const PATH: Type = _

PATH - geometric path '(pt1,…)'

Source

pub const BOX: Type = _

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

Source

pub const POLYGON: Type = _

POLYGON - geometric polygon '(pt1,…)'

Source

pub const LINE: Type = _

LINE - geometric line

Source

pub const LINE_ARRAY: Type = _

LINE[]

Source

pub const CIDR: Type = _

CIDR - network IP address/netmask, network address

Source

pub const CIDR_ARRAY: Type = _

CIDR[]

Source

pub const FLOAT4: Type = _

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

Source

pub const FLOAT8: Type = _

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

Source

pub const UNKNOWN: Type = _

UNKNOWN - pseudo-type representing an undetermined type

Source

pub const CIRCLE: Type = _

CIRCLE - geometric circle '(center,radius)'

Source

pub const CIRCLE_ARRAY: Type = _

CIRCLE[]

Source

pub const MACADDR8: Type = _

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

Source

pub const MACADDR8_ARRAY: Type = _

MACADDR8[]

Source

pub const MONEY: Type = _

MONEY - monetary amounts, $d,ddd.cc

Source

pub const MONEY_ARRAY: Type = _

MONEY[]

Source

pub const MACADDR: Type = _

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

Source

pub const INET: Type = _

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

Source

pub const BOOL_ARRAY: Type = _

BOOL[]

Source

pub const BYTEA_ARRAY: Type = _

BYTEA[]

Source

pub const CHAR_ARRAY: Type = _

CHAR[]

Source

pub const NAME_ARRAY: Type = _

NAME[]

Source

pub const INT2_ARRAY: Type = _

INT2[]

Source

pub const INT2_VECTOR_ARRAY: Type = _

INT2VECTOR[]

Source

pub const INT4_ARRAY: Type = _

INT4[]

Source

pub const REGPROC_ARRAY: Type = _

REGPROC[]

Source

pub const TEXT_ARRAY: Type = _

TEXT[]

Source

pub const TID_ARRAY: Type = _

TID[]

Source

pub const XID_ARRAY: Type = _

XID[]

Source

pub const CID_ARRAY: Type = _

CID[]

Source

pub const OID_VECTOR_ARRAY: Type = _

OIDVECTOR[]

Source

pub const BPCHAR_ARRAY: Type = _

BPCHAR[]

Source

pub const VARCHAR_ARRAY: Type = _

VARCHAR[]

Source

pub const INT8_ARRAY: Type = _

INT8[]

Source

pub const POINT_ARRAY: Type = _

POINT[]

Source

pub const LSEG_ARRAY: Type = _

LSEG[]

Source

pub const PATH_ARRAY: Type = _

PATH[]

Source

pub const BOX_ARRAY: Type = _

BOX[]

Source

pub const FLOAT4_ARRAY: Type = _

FLOAT4[]

Source

pub const FLOAT8_ARRAY: Type = _

FLOAT8[]

Source

pub const POLYGON_ARRAY: Type = _

POLYGON[]

Source

pub const OID_ARRAY: Type = _

OID[]

Source

pub const ACLITEM: Type = _

ACLITEM - access control list

Source

pub const ACLITEM_ARRAY: Type = _

ACLITEM[]

Source

pub const MACADDR_ARRAY: Type = _

MACADDR[]

Source

pub const INET_ARRAY: Type = _

INET[]

Source

pub const BPCHAR: Type = _

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

Source

pub const VARCHAR: Type = _

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

Source

pub const DATE: Type = _

DATE - date

Source

pub const TIME: Type = _

TIME - time of day

Source

pub const TIMESTAMP: Type = _

TIMESTAMP - date and time

Source

pub const TIMESTAMP_ARRAY: Type = _

TIMESTAMP[]

Source

pub const DATE_ARRAY: Type = _

DATE[]

Source

pub const TIME_ARRAY: Type = _

TIME[]

Source

pub const TIMESTAMPTZ: Type = _

TIMESTAMPTZ - date and time with time zone

Source

pub const TIMESTAMPTZ_ARRAY: Type = _

TIMESTAMPTZ[]

Source

pub const INTERVAL: Type = _

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

Source

pub const INTERVAL_ARRAY: Type = _

INTERVAL[]

Source

pub const NUMERIC_ARRAY: Type = _

NUMERIC[]

Source

pub const CSTRING_ARRAY: Type = _

CSTRING[]

Source

pub const TIMETZ: Type = _

TIMETZ - time of day with time zone

Source

pub const TIMETZ_ARRAY: Type = _

TIMETZ[]

Source

pub const BIT: Type = _

BIT - fixed-length bit string

Source

pub const BIT_ARRAY: Type = _

BIT[]

Source

pub const VARBIT: Type = _

VARBIT - variable-length bit string

Source

pub const VARBIT_ARRAY: Type = _

VARBIT[]

Source

pub const NUMERIC: Type = _

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

Source

pub const REFCURSOR: Type = _

REFCURSOR - reference to cursor (portal name)

Source

pub const REFCURSOR_ARRAY: Type = _

REFCURSOR[]

Source

pub const REGPROCEDURE: Type = _

REGPROCEDURE - registered procedure (with args)

Source

pub const REGOPER: Type = _

REGOPER - registered operator

Source

pub const REGOPERATOR: Type = _

REGOPERATOR - registered operator (with args)

Source

pub const REGCLASS: Type = _

REGCLASS - registered class

Source

pub const REGTYPE: Type = _

REGTYPE - registered type

Source

pub const REGPROCEDURE_ARRAY: Type = _

REGPROCEDURE[]

Source

pub const REGOPER_ARRAY: Type = _

REGOPER[]

Source

pub const REGOPERATOR_ARRAY: Type = _

REGOPERATOR[]

Source

pub const REGCLASS_ARRAY: Type = _

REGCLASS[]

Source

pub const REGTYPE_ARRAY: Type = _

REGTYPE[]

Source

pub const RECORD: Type = _

RECORD - pseudo-type representing any composite type

Source

pub const CSTRING: Type = _

CSTRING - C-style string

Source

pub const ANY: Type = _

ANY - pseudo-type representing any type

Source

pub const ANYARRAY: Type = _

ANYARRAY - pseudo-type representing a polymorphic array type

Source

pub const VOID: Type = _

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

Source

pub const TRIGGER: Type = _

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

Source

pub const LANGUAGE_HANDLER: Type = _

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

Source

pub const INTERNAL: Type = _

INTERNAL - pseudo-type representing an internal data structure

Source

pub const ANYELEMENT: Type = _

ANYELEMENT - pseudo-type representing a polymorphic base type

Source

pub const RECORD_ARRAY: Type = _

RECORD[]

Source

pub const ANYNONARRAY: Type = _

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

Source

pub const TXID_SNAPSHOT_ARRAY: Type = _

TXID_SNAPSHOT[]

Source

pub const UUID: Type = _

UUID - UUID datatype

Source

pub const UUID_ARRAY: Type = _

UUID[]

Source

pub const TXID_SNAPSHOT: Type = _

TXID_SNAPSHOT - txid snapshot

Source

pub const FDW_HANDLER: Type = _

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

Source

pub const PG_LSN: Type = _

PG_LSN - PostgreSQL LSN datatype

Source

pub const PG_LSN_ARRAY: Type = _

PG_LSN[]

Source

pub const TSM_HANDLER: Type = _

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

Source

pub const PG_NDISTINCT: Type = _

PG_NDISTINCT - multivariate ndistinct coefficients

Source

pub const PG_DEPENDENCIES: Type = _

PG_DEPENDENCIES - multivariate dependencies

Source

pub const ANYENUM: Type = _

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

Source

pub const TS_VECTOR: Type = _

TSVECTOR - text representation for text search

Source

pub const TSQUERY: Type = _

TSQUERY - query representation for text search

Source

pub const GTS_VECTOR: Type = _

GTSVECTOR - GiST index internal text representation for text search

Source

pub const TS_VECTOR_ARRAY: Type = _

TSVECTOR[]

Source

pub const GTS_VECTOR_ARRAY: Type = _

GTSVECTOR[]

Source

pub const TSQUERY_ARRAY: Type = _

TSQUERY[]

Source

pub const REGCONFIG: Type = _

REGCONFIG - registered text search configuration

Source

pub const REGCONFIG_ARRAY: Type = _

REGCONFIG[]

Source

pub const REGDICTIONARY: Type = _

REGDICTIONARY - registered text search dictionary

Source

pub const REGDICTIONARY_ARRAY: Type = _

REGDICTIONARY[]

Source

pub const JSONB: Type = _

JSONB - Binary JSON

Source

pub const JSONB_ARRAY: Type = _

JSONB[]

Source

pub const ANY_RANGE: Type = _

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

Source

pub const EVENT_TRIGGER: Type = _

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

Source

pub const INT4_RANGE: Type = _

INT4RANGE - range of integers

Source

pub const INT4_RANGE_ARRAY: Type = _

INT4RANGE[]

Source

pub const NUM_RANGE: Type = _

NUMRANGE - range of numerics

Source

pub const NUM_RANGE_ARRAY: Type = _

NUMRANGE[]

Source

pub const TS_RANGE: Type = _

TSRANGE - range of timestamps without time zone

Source

pub const TS_RANGE_ARRAY: Type = _

TSRANGE[]

Source

pub const TSTZ_RANGE: Type = _

TSTZRANGE - range of timestamps with time zone

Source

pub const TSTZ_RANGE_ARRAY: Type = _

TSTZRANGE[]

Source

pub const DATE_RANGE: Type = _

DATERANGE - range of dates

Source

pub const DATE_RANGE_ARRAY: Type = _

DATERANGE[]

Source

pub const INT8_RANGE: Type = _

INT8RANGE - range of bigints

Source

pub const INT8_RANGE_ARRAY: Type = _

INT8RANGE[]

Source

pub const JSONPATH: Type = _

JSONPATH - JSON path

Source

pub const JSONPATH_ARRAY: Type = _

JSONPATH[]

Source

pub const REGNAMESPACE: Type = _

REGNAMESPACE - registered namespace

Source

pub const REGNAMESPACE_ARRAY: Type = _

REGNAMESPACE[]

Source

pub const REGROLE: Type = _

REGROLE - registered role

Source

pub const REGROLE_ARRAY: Type = _

REGROLE[]

Source

pub const REGCOLLATION: Type = _

REGCOLLATION - registered collation

Source

pub const REGCOLLATION_ARRAY: Type = _

REGCOLLATION[]

Source

pub const INT4MULTI_RANGE: Type = _

INT4MULTIRANGE - multirange of integers

Source

pub const NUMMULTI_RANGE: Type = _

NUMMULTIRANGE - multirange of numerics

Source

pub const TSMULTI_RANGE: Type = _

TSMULTIRANGE - multirange of timestamps without time zone

Source

pub const TSTZMULTI_RANGE: Type = _

TSTZMULTIRANGE - multirange of timestamps with time zone

Source

pub const DATEMULTI_RANGE: Type = _

DATEMULTIRANGE - multirange of dates

Source

pub const INT8MULTI_RANGE: Type = _

INT8MULTIRANGE - multirange of bigints

Source

pub const ANYMULTI_RANGE: Type = _

ANYMULTIRANGE - pseudo-type representing a polymorphic base type that is a multirange

Source

pub const ANYCOMPATIBLEMULTI_RANGE: Type = _

ANYCOMPATIBLEMULTIRANGE - pseudo-type representing a multirange over a polymorphic common type

Source

pub const PG_BRIN_BLOOM_SUMMARY: Type = _

PG_BRIN_BLOOM_SUMMARY - BRIN bloom summary

Source

pub const PG_BRIN_MINMAX_MULTI_SUMMARY: Type = _

PG_BRIN_MINMAX_MULTI_SUMMARY - BRIN minmax-multi summary

Source

pub const PG_MCV_LIST: Type = _

PG_MCV_LIST - multivariate MCV list

Source

pub const PG_SNAPSHOT: Type = _

PG_SNAPSHOT - snapshot

Source

pub const PG_SNAPSHOT_ARRAY: Type = _

PG_SNAPSHOT[]

Source

pub const XID8: Type = _

XID8 - full transaction id

Source

pub const ANYCOMPATIBLE: Type = _

ANYCOMPATIBLE - pseudo-type representing a polymorphic common type

Source

pub const ANYCOMPATIBLEARRAY: Type = _

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

Source

pub const ANYCOMPATIBLENONARRAY: Type = _

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

Source

pub const ANYCOMPATIBLE_RANGE: Type = _

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

Source

pub const INT4MULTI_RANGE_ARRAY: Type = _

INT4MULTIRANGE[]

Source

pub const NUMMULTI_RANGE_ARRAY: Type = _

NUMMULTIRANGE[]

Source

pub const TSMULTI_RANGE_ARRAY: Type = _

TSMULTIRANGE[]

Source

pub const TSTZMULTI_RANGE_ARRAY: Type = _

TSTZMULTIRANGE[]

Source

pub const DATEMULTI_RANGE_ARRAY: Type = _

DATEMULTIRANGE[]

Source

pub const INT8MULTI_RANGE_ARRAY: Type = _

INT8MULTIRANGE[]

Source§

impl Type

Source

pub fn new(name: String, oid: Oid, kind: Kind, schema: String) -> Type

Creates a new Type.

Source

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

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

Source

pub fn oid(&self) -> Oid

Returns the OID of the Type.

Source

pub fn kind(&self) -> &Kind

Returns the kind of this type.

Source

pub fn schema(&self) -> &str

Returns the schema of this type.

Source

pub fn name(&self) -> &str

Returns the name of this type.

Trait Implementations§

Source§

impl Clone for Type

Source§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Type

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for Type

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Hash for Type

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

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

impl PartialEq for Type

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Type

Source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V