Search Results for

    Show / Hide Table of Contents

    Class PostgresType

    Represents a PostgreSQL data type, such as int4 or text, as discovered from pg_type. This class is abstract, see derived classes for concrete types of PostgreSQL types.

    Inheritance
    Object
    PostgresType
    PostgresArrayType
    PostgresBaseType
    PostgresCompositeType
    PostgresDomainType
    PostgresEnumType
    PostgresMultirangeType
    PostgresRangeType
    UnknownBackendType
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Npgsql.PostgresTypes
    Assembly: Npgsql.dll
    Syntax
    public abstract class PostgresType
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    Constructors

    | Improve this Doc View Source

    PostgresType(String, String, String, UInt32)

    Constructs a representation of a PostgreSQL data type.

    Declaration
    protected PostgresType(string ns, string name, string internalName, uint oid)
    Parameters
    Type Name Description
    String ns

    The data type's namespace (or schema).

    String name

    The data type's name.

    String internalName

    The data type's internal name (e.g. _int4 for integer[]).

    UInt32 oid

    The data type's OID.

    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    | Improve this Doc View Source

    PostgresType(String, String, UInt32)

    Constructs a representation of a PostgreSQL data type.

    Declaration
    protected PostgresType(string ns, string name, uint oid)
    Parameters
    Type Name Description
    String ns

    The data type's namespace (or schema).

    String name

    The data type's name.

    UInt32 oid

    The data type's OID.

    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    Properties

    | Improve this Doc View Source

    Array

    If a PostgreSQL array type exists for this type, it will be referenced here. Otherwise null.

    Declaration
    public PostgresArrayType Array { get; }
    Property Value
    Type Description
    PostgresArrayType
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    | Improve this Doc View Source

    DisplayName

    A display name for this backend type, including the namespace unless it is pg_catalog (the namespace for all built-in types).

    Declaration
    public string DisplayName { get; }
    Property Value
    Type Description
    String
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    | Improve this Doc View Source

    FullName

    The full name of the backend type, including its namespace.

    Declaration
    public string FullName { get; }
    Property Value
    Type Description
    String
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    | Improve this Doc View Source

    InternalName

    The data type's internal PostgreSQL name (e.g. _int4 not integer[]). See Name for a more user-friendly name.

    Declaration
    public string InternalName { get; }
    Property Value
    Type Description
    String
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    | Improve this Doc View Source

    Name

    The data type's name.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String
    Remarks

    Note that this is the standard, user-displayable type name (e.g. integer[]) rather than the internal PostgreSQL name as it is in pg_type (_int4). See InternalName for the latter.

    | Improve this Doc View Source

    Namespace

    The data type's namespace (or schema).

    Declaration
    public string Namespace { get; }
    Property Value
    Type Description
    String
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    | Improve this Doc View Source

    OID

    The data type's OID - a unique id identifying the data type in a given database (in pg_type).

    Declaration
    public uint OID { get; }
    Property Value
    Type Description
    UInt32
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    | Improve this Doc View Source

    Range

    If a PostgreSQL range type exists for this type, it will be referenced here. Otherwise null.

    Declaration
    public PostgresRangeType Range { get; }
    Property Value
    Type Description
    PostgresRangeType
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

    Methods

    | Improve this Doc View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    Remarks

    Instances of this class are shared between connections to the same databases. For more info about what this class and its subclasses represent, see https://www.postgresql.org/docs/current/static/catalog-pg-type.html.

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