Search Results for

    Show / Hide Table of Contents

    Class PostgresDomainType

    Represents a PostgreSQL domain type.

    Inheritance
    object
    PostgresType
    PostgresDomainType
    Inherited Members
    PostgresType.OID
    PostgresType.Namespace
    PostgresType.Name
    PostgresType.FullName
    PostgresType.DisplayName
    PostgresType.InternalName
    PostgresType.Array
    PostgresType.Range
    PostgresType.ToString()
    Namespace: Npgsql.PostgresTypes
    Assembly: Npgsql.dll
    Syntax
    public class PostgresDomainType : PostgresType
    Remarks

    See https://www.postgresql.org/docs/current/static/sql-createdomain.html.

    When PostgreSQL returns a RowDescription for a domain type, the type OID is the base type's (so fetching a domain type over text returns a RowDescription for text). However, when a composite type is returned, the type OID there is that of the domain, so we provide "clean" support for domain types.

    Constructors

    | Improve this Doc View Source

    PostgresDomainType(string, string, uint, PostgresType, bool)

    Constructs a representation of a PostgreSQL domain data type.

    Declaration
    protected PostgresDomainType(string ns, string name, uint oid, PostgresType baseType, bool notNull)
    Parameters
    Type Name Description
    string ns
    string name
    uint oid
    PostgresType baseType
    bool notNull
    Remarks

    See https://www.postgresql.org/docs/current/static/sql-createdomain.html.

    When PostgreSQL returns a RowDescription for a domain type, the type OID is the base type's (so fetching a domain type over text returns a RowDescription for text). However, when a composite type is returned, the type OID there is that of the domain, so we provide "clean" support for domain types.

    Properties

    | Improve this Doc View Source

    BaseType

    The PostgreSQL data type of the base type, i.e. the type this domain is based on.

    Declaration
    public PostgresType BaseType { get; }
    Property Value
    Type Description
    PostgresType
    Remarks

    See https://www.postgresql.org/docs/current/static/sql-createdomain.html.

    When PostgreSQL returns a RowDescription for a domain type, the type OID is the base type's (so fetching a domain type over text returns a RowDescription for text). However, when a composite type is returned, the type OID there is that of the domain, so we provide "clean" support for domain types.

    | Improve this Doc View Source

    NotNull

    True if the domain has a NOT NULL constraint, otherwise false.

    Declaration
    public bool NotNull { get; }
    Property Value
    Type Description
    bool
    Remarks

    See https://www.postgresql.org/docs/current/static/sql-createdomain.html.

    When PostgreSQL returns a RowDescription for a domain type, the type OID is the base type's (so fetching a domain type over text returns a RowDescription for text). However, when a composite type is returned, the type OID there is that of the domain, so we provide "clean" support for domain types.

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