Search Results for

    Show / Hide Table of Contents

    Enum NpgsqlDbType

    Represents a PostgreSQL data type that can be written or read to the database. Used in places such as NpgsqlDbType to unambiguously specify how to encode or decode values.

    Namespace: NpgsqlTypes
    Assembly: Npgsql.dll
    Syntax
    public enum NpgsqlDbType : int
    Remarks

    See https://www.postgresql.org/docs/current/static/datatype.html

    Fields

    Name Description
    Abstime

    Corresponds to the obsolete PostgreSQL "abstime" type.

    Array

    Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of another type. This value must be combined with another value from NpgsqlDbType via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer)

    Bigint

    Corresponds to the PostgreSQL 8-byte "bigint" type.

    BigIntMultirange

    Corresponds to the PostgreSQL "int8multirange" type.

    BigIntRange

    Corresponds to the PostgreSQL "int8range" type.

    Bit

    Corresponds to the PostgreSQL "bit" type.

    Boolean

    Corresponds to the PostgreSQL "boolean" type.

    Box

    Corresponds to the PostgreSQL geometric "box" type.

    Bytea

    Corresponds to the PostgreSQL "bytea" type, holding a raw byte string.

    Char

    Corresponds to the PostgreSQL "char(n)" type.

    Cid

    Corresponds to the PostgreSQL "cid" type, an internal command identifier.

    Cidr

    Corresponds to the PostgreSQL "cidr" type, a field storing an IPv4 or IPv6 network.

    Circle

    Corresponds to the PostgreSQL geometric "circle" type.

    Citext

    Corresponds to the PostgreSQL "citext" type for the citext module.

    Date

    Corresponds to the PostgreSQL "date" type.

    DateMultirange

    Corresponds to the PostgreSQL "datemultirange" type.

    DateRange

    Corresponds to the PostgreSQL "daterange" type.

    Double

    Corresponds to the PostgreSQL 8-byte floating-point "double" type.

    Geography

    The geography (geodetic) type for PostgreSQL spatial extension PostGIS.

    Geometry

    The geometry type for PostgreSQL spatial extension PostGIS.

    Hstore

    Corresponds to the PostgreSQL "hstore" type, a dictionary of string key-value pairs.

    Inet

    Corresponds to the PostgreSQL "inet" type.

    Int2Vector

    Corresponds to the PostgreSQL internal "int2vector" type.

    Integer

    Corresponds to the PostgreSQL 4-byte "integer" type.

    IntegerMultirange

    Corresponds to the PostgreSQL "int4multirange" type.

    IntegerRange

    Corresponds to the PostgreSQL "int4range" type.

    InternalChar

    Corresponds to the PostgreSQL "char" type.

    Interval

    Corresponds to the PostgreSQL "interval" type.

    Json

    Corresponds to the PostgreSQL "json" type, a field storing JSON in text format.

    Jsonb

    Corresponds to the PostgreSQL "jsonb" type, a field storing JSON in an optimized binary. format.

    JsonPath

    Corresponds to the PostgreSQL "jsonpath" type, a field storing JSON path in text format. format.

    Line

    Corresponds to the PostgreSQL geometric "line" type.

    LQuery

    The PostgreSQL lquery type for PostgreSQL extension ltree

    LSeg

    Corresponds to the PostgreSQL geometric "lseg" type.

    LTree

    The PostgreSQL ltree type, each value is a label path "a.label.tree.value", forming a tree in a set.

    LTxtQuery

    The PostgreSQL ltxtquery type for PostgreSQL extension ltree

    MacAddr

    Corresponds to the PostgreSQL "macaddr" type, a field storing a 6-byte physical address.

    MacAddr8

    Corresponds to the PostgreSQL "macaddr8" type, a field storing a 6-byte or 8-byte physical address.

    Money

    Corresponds to the PostgreSQL "money" type.

    Multirange

    Corresponds to the PostgreSQL "multirange" type, continuous range of values of specific type. This value must be combined with another value from NpgsqlDbType via a bit OR (e.g. NpgsqlDbType.Multirange | NpgsqlDbType.Integer)

    Name

    Corresponds to the PostgreSQL internal "name" type.

    Numeric

    Corresponds to the PostgreSQL arbitrary-precision "numeric" type.

    NumericMultirange

    Corresponds to the PostgreSQL "nummultirange" type.

    NumericRange

    Corresponds to the PostgreSQL "numrange" type.

    Oid

    Corresponds to the PostgreSQL "oid" type.

    Oidvector

    Corresponds to the PostgreSQL internal "oidvector" type.

    Path

    Corresponds to the PostgreSQL geometric "path" type.

    PgLsn

    Corresponds to the PostgreSQL "pg_lsn" type, which can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the WAL.

    Point

    Corresponds to the PostgreSQL geometric "point" type.

    Polygon

    Corresponds to the PostgreSQL geometric "polygon" type.

    Range

    Corresponds to the PostgreSQL "range" type, continuous range of values of specific type. This value must be combined with another value from NpgsqlDbType via a bit OR (e.g. NpgsqlDbType.Range | NpgsqlDbType.Integer)

    Real

    Corresponds to the PostgreSQL floating-point "real" type.

    Refcursor

    Corresponds to the PostgreSQL "refcursor" type.

    Regconfig

    Corresponds to the PostgreSQL "regconfig" type.

    Regtype

    Corresponds to the PostgreSQL "regtype" type, a numeric (OID) ID of a type in the pg_type table.

    Smallint

    Corresponds to the PostgreSQL 2-byte "smallint" type.

    Text

    Corresponds to the PostgreSQL "text" type.

    Tid

    Corresponds to the PostgreSQL "tid" type, a tuple id identifying the physical location of a row within its table.

    Time

    Corresponds to the PostgreSQL "time" type.

    Timestamp

    Corresponds to the PostgreSQL "timestamp" type.

    TimestampMultirange

    Corresponds to the PostgreSQL "tsmultirange" type.

    TimestampRange

    Corresponds to the PostgreSQL "tsrange" type.

    TimestampTz

    Corresponds to the PostgreSQL "timestamp with time zone" type.

    TimestampTZ

    Corresponds to the PostgreSQL "timestamp with time zone" type.

    TimestampTzMultirange

    Corresponds to the PostgreSQL "tstzmultirange" type.

    TimestampTzRange

    Corresponds to the PostgreSQL "tstzrange" type.

    TimeTz

    Corresponds to the PostgreSQL "time with time zone" type.

    TimeTZ

    Corresponds to the PostgreSQL "time with time zone" type.

    TsQuery

    Corresponds to the PostgreSQL "tsquery" type.

    TsVector

    Corresponds to the PostgreSQL "tsvector" type.

    Unknown

    A special value that can be used to send parameter values to the database without specifying their type, allowing the database to cast them to another value based on context. The value will be converted to a string and send as text.

    Uuid

    Corresponds to the PostgreSQL "uuid" type.

    Varbit

    Corresponds to the PostgreSQL "varbit" type, a field storing a variable-length string of bits.

    Varchar

    Corresponds to the PostgreSQL "varchar" type.

    Xid

    Corresponds to the PostgreSQL "xid" type, an internal transaction identifier.

    Xid8

    Corresponds to the PostgreSQL "xid8" type, an internal transaction identifier.

    Xml

    Corresponds to the PostgreSQL "xml" type.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2022 The Npgsql Development Team