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
System.Object
PostgresType
PostgresArrayType
PostgresBaseType
PostgresCompositeType
PostgresDomainType
PostgresEnumType
PostgresRangeType
UnknownBackendType
Namespace: Npgsql.PostgresTypes
Assembly: Npgsql.dll
Syntax
public abstract class PostgresType : object
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

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
System.String ns

The data type's namespace (or schema).

System.String name

The data type's name.

System.UInt32 oid

The data type's OID.

Fields

HandlerType

For base types, contains the handler type. If null, this backend type isn't supported by Npgsql.

Declaration
protected Type HandlerType
Field Value
Type Description
Type

Properties

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

DisplayName

A display name for this backend type, suitable for display purposes. If the backend type is defined in the default namespace (pg_catalog), it will be omitted.

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

FullName

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

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

Name

The data type's name.

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

Namespace

The data type's namespace (or schema).

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

NpgsqlDbType

The NpgsqlDbType associated with this backend type, if any.

Declaration
public NpgsqlDbType? NpgsqlDbType { get; protected set; }
Property Value
Type Description
System.Nullable<NpgsqlDbType>

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
System.UInt32

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

Methods

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
System.String
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX