Npgsql Initializes a new instance of the class. Initializes a new instance of the class with the specified message. An optional message associated with this attribute instance. Returns the optional message associated with this attribute instance. Returns the optional URL associated with this attribute instance. A set of extension methods to to allow runtime compatibility. Appends the provided to the . The to append to. The to append. Gets a that will complete when this completes, when the specified timeout expires, or when the specified has cancellation requested. The representing the asynchronous wait. The timeout after which the should be faulted with a if it hasn't otherwise completed. The to monitor for a cancellation request. The representing the asynchronous wait. This method reproduces new to the .NET 6.0 API .WaitAsync. Note that this message doesn't actually contain the data, but only the length. Data is processed directly from the connector's buffer. DataRow is special in that it does not parse the actual contents of the backend message, because in sequential mode the message will be traversed and processed sequentially by . Error and notice message field codes A RowDescription message sent from the backend. See https://www.postgresql.org/docs/current/static/protocol-message-formats.html Given a string name, returns the field's ordinal index in the row. Given a string name, returns the field's ordinal index in the row. Comparer that's case-insensitive and Kana width-insensitive A descriptive record on a single field received from PostgreSQL. See RowDescription in https://www.postgresql.org/docs/current/static/protocol-message-formats.html The field name. The object ID of the field's data type. The data type size (see pg_type.typlen). Note that negative values denote variable-width types. The type modifier (see pg_attribute.atttypmod). The meaning of the modifier is type-specific. If the field can be identified as a column of a specific table, the object ID of the table; otherwise zero. If the field can be identified as a column of a specific table, the attribute number of the column; otherwise zero. The format code being used for the field. Currently will be zero (text) or one (binary). In a RowDescription returned from the statement variant of Describe, the format code is not yet known and will always be zero. The Npgsql type handler assigned to handle this field. Returns for fields with format text. Returns a string that represents the current object. Base class for all classes which represent a message sent by the PostgreSQL backend. Specifies the type of SQL statement, e.g. SELECT A factory which get generate instances of , which describe a database and the types it contains. When first connecting to a database, Npgsql will attempt to load information about it via this factory. Given a connection, loads all necessary information about the connected database, e.g. its types. A factory should only handle the exact database type it was meant for, and return null otherwise. An object describing the database to which is connected, or null if the database isn't of the correct type and isn't handled by this factory. Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are exposed to users, connectors are internal to Npgsql and are recycled by the connection pool. The physical connection socket to the backend. The physical connection stream to the backend, without anything on top. The physical connection stream to the backend, layered with an SSL/TLS stream if in secure mode. The parsed connection string. Same as , except that it does not throw an exception if an invalid char is encountered (exception fallback), but rather replaces it with a question mark character (replacement fallback). Buffer used for reading data. If we read a data row that's bigger than , we allocate an oversize buffer. The original (smaller) buffer is stored here, and restored when the connection is reset. Buffer used for writing data. The secret key of the backend for this connector, used for query cancellation. The process ID of the backend for this connector. A unique ID identifying this connector, used for logging. Currently mapped to BackendProcessId Information about PostgreSQL and PostgreSQL-like databases (e.g. type definitions, capabilities...). The current transaction status for this connector. A transaction object for this connector. Since only one transaction can be in progress at any given time, this instance is recycled. To check whether a transaction is currently in progress on this connector, see . The NpgsqlConnection that (currently) owns this connector. Null if the connector isn't owned (i.e. idle in the pool) The number of messages that were prepended to the current message chain, but not yet sent. Note that this only tracks messages which produce a ReadyForQuery message If the connector is currently in COPY mode, holds a reference to the importer/exporter object. Otherwise null. Holds all run-time parameters received from the backend (via ParameterStatus messages) Holds all run-time parameters in raw, binary format for efficient handling without allocations. If this connector was broken, this contains the exception that caused the break. Used by the pool to indicate that I/O is currently in progress on this connector, so that another write isn't started concurrently. Note that since we have only one write loop, this is only ever usedto protect against an over-capacity writes into a connector that's currently *asynchronously* writing. It is guaranteed that the currently-executing Specifically, reading may occur - and the connector may even be returned to the pool - before this is released. The timeout for reading messages that are part of the user's command (i.e. which aren't internal prepended commands). Precision is milliseconds A lock that's taken while a cancellation is being delivered; new queries are blocked until the cancellation is delivered. This reduces the chance that a cancellation meant for a previous command will accidentally cancel a later one, see #615. The command currently being executed by the connector, null otherwise. Used only for concurrent use error reporting purposes. The connector source (e.g. pool) from where this connector came, and to which it will be returned. Note that in multi-host scenarios, this references the host-specific rather than the . Contains the UTC timestamp when this connector was opened, used to implement . The minimum timeout that can be set on internal commands such as COMMIT, ROLLBACK. Precision is seconds The actual command timeout value that gets set on internal commands. Precision is milliseconds Gets the current state of the connector Returns whether the connector is open, regardless of any task it is currently performing Opens the physical connection to the server. Usually called by the RequestConnector Method of the connection pool manager. Prepends a message to be sent at the beginning of the next message chain. Reads backend messages and discards them, stopping only after a message of the given type has been seen. Only a sync I/O version of this method exists - in async flows we inline the loop rather than calling an additional async method, in order to avoid the overhead. Handles a new transaction indicator received on a ReadyForQuery message Returns whether SSL is being used for the connection Returns whether SCRAM-SHA256 is being user for the connection Returns whether SCRAM-SHA256-PLUS is being user for the connection Creates another connector and sends a cancel request through it for this connector. This method never throws, but returns whether the cancellation attempt failed. if the cancellation request was successfully delivered, or if it was skipped because a previous request was already sent. if the cancellation request could not be delivered because of an exception (the method logs internally). This does not indicate whether the cancellation attempt was successful on the PostgreSQL side - only if the request was delivered. Starts a new cancellable operation within an ongoing user action. This should only be used if a single user action spans several different actions which each has its own cancellation tokens. For example, a command execution is a single user action, but spans ExecuteReaderQuery, NextResult, Read and so forth. Only one level of nested operations is supported. It is an error to call this method if it has previously been called, and the returned was not disposed. The cancellation token provided by the user. Callbacks will be registered on this token for executing the cancellation, and the token will be included in any thrown . If , PostgreSQL cancellation will be attempted when the user requests cancellation or a timeout occurs, followed by a client-side socket cancellation once has elapsed. If , PostgreSQL cancellation will be skipped and client-socket cancellation will occur immediately. Closes ongoing operations, i.e. an open reader exists or a COPY operation still in progress, as part of a connection close. Called when an unexpected message has been received during an action. Breaks the connector and returns the appropriate message. Called when a connector becomes completely unusable, e.g. when an unexpected I/O exception is raised or when we lose protocol sync. Note that fatal errors during the Open phase do *not* pass through here. The exception that caused the break. The exception given in for chaining calls. Closes the socket and cleans up client-side resources associated with this connector. This method doesn't actually perform any meaningful I/O, and therefore is sync-only. Called when a pooled connection is closed, and its connector is returned to the pool. Resets the connector back to its initial state, releasing server-side sources (e.g. prepared statements), resetting parameters to their defaults, and resetting client-side state The connector may have allocated an oversize read buffer, to hold big rows in non-sequential reading. This switches us back to the original one and returns the buffer to . Starts a user action. This makes sure that another action isn't already in progress, handles synchronization with keepalive, and sets up cancellation. The new state to be set when entering this user action. The that is starting execution - if an is thrown, it will reference this. The cancellation token provided by the user. Callbacks will be registered on this token for executing the cancellation, and the token will be included in any thrown . If , PostgreSQL cancellation will be attempted when the user requests cancellation or a timeout occurs, followed by a client-side socket cancellation once has elapsed. If , PostgreSQL cancellation will be skipped and client-socket cancellation will occur immediately. An IDisposable wrapper around . The connection's timezone as reported by PostgreSQL, in the IANA/Olson database format. Creates and returns a object associated with the . The text of the query. A object. This Stream is placed between NegotiateStream and the socket's NetworkStream (or SSLStream). It intercepts traffic and performs the following operations: * Outgoing messages are framed in PostgreSQL's PasswordMessage, and incoming are stripped of it. * NegotiateStream frames payloads with a 5-byte header, which PostgreSQL doesn't understand. This header is stripped from outgoing messages and added to incoming ones. See https://referencesource.microsoft.com/#System/net/System/Net/_StreamFramer.cs,16417e735f0e9530,references Expresses the exact state of a connector. The connector has either not yet been opened or has been closed. The connector is currently connecting to a PostgreSQL server. The connector is connected and may be used to send a new query. The connector is waiting for a response to a query which has been sent to the server. The connector is currently fetching and processing query results. The connector is currently waiting for asynchronous notifications to arrive. The connection was broken because an unexpected error occurred which left it in an unknown state. This state isn't implemented yet. The connector is engaged in a COPY operation. The connector is engaged in streaming replication. Currently not in a transaction block Currently in a transaction block Currently in a failed transaction block (queries will be rejected until block is ended) A new transaction has been requested but not yet transmitted to the backend. It will be transmitted prepended to the next query. This is a client-side state option only, and is never transmitted from the backend. Specifies how to load/parse DataRow messages as they're received from the backend. Load DataRows in non-sequential mode Load DataRows in sequential mode Skip DataRow messages altogether Base class for implementations which provide information about PostgreSQL and PostgreSQL-like databases (e.g. type definitions, capabilities...). The hostname of IP address of the database. The TCP port of the database. The database name. The version of the PostgreSQL database we're connected to, as reported in the "server_version" parameter. Exposed via . The PostgreSQL version string as returned by the server_version option. Populated during loading. Whether the backend supports range types. Whether the backend supports multirange types. Whether the backend supports enum types. Whether the backend supports the CLOSE ALL statement. Whether the backend supports advisory locks. Whether the backend supports the DISCARD SEQUENCES statement. Whether the backend supports the UNLISTEN statement. Whether the backend supports the DISCARD TEMP statement. Whether the backend supports the DISCARD statement. Reports whether the backend uses the newer integer timestamp representation. Whether the database supports transactions. Indexes backend types by their type OID. Indexes backend types by their PostgreSQL name, including namespace (e.g. pg_catalog.int4). Only used for enums and composites. Indexes backend types by their PostgreSQL name, not including namespace. If more than one type exists with the same name (i.e. in different namespaces) this table will contain an entry with a null value. Only used for enums and composites. Initializes the instance of . Initializes the instance of . Provides all PostgreSQL types detected in this database. Parses a PostgreSQL server version (e.g. 10.1, 9.6.3) and returns a CLR Version. Registers a new database info factory, which is used to load information about databases. A buffer used by Npgsql to read data from the socket efficiently. Provides methods which decode different values types and tracks the current position. Timeout for sync and async reads The total byte length of the buffer. Same as , except that it does not throw an exception if an invalid char is encountered (exception fallback), but rather replaces it with a question mark character (replacement fallback). The minimum buffer size possible. Ensures that bytes are available in the buffer, and if not, reads from the socket until enough is available. Does not perform any I/O - assuming that the bytes to be skipped are in the memory buffer. Skip a given number of bytes. Seeks the first null terminator (\0) and returns the string up to it. The buffer must already contain the entire string and its terminator. Seeks the first null terminator (\0) and returns the string up to it. The buffer must already contain the entire string and its terminator. If any character could not be decoded, a question mark character is returned instead of throwing an exception. Seeks the first null terminator (\0) and returns the string up to it. Reads additional data from the network if a null terminator isn't found in the buffered data. A buffer used by Npgsql to write data to the socket efficiently. Provides methods which encode different values types and tracks the current position. Timeout for sync and async writes The total byte length of the buffer. The minimum buffer size possible. Returns all contents currently written to the buffer (but not flushed). Useful for pre-generating messages. Non-generic base class for all type handlers which handle PostgreSQL arrays. Extend from instead. https://www.postgresql.org/docs/current/static/arrays.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Reads an array of element type from the given buffer . Reads a generic list containing elements of type from the given buffer . Base class for all type handlers which handle PostgreSQL arrays. https://www.postgresql.org/docs/current/static/arrays.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. https://www.postgresql.org/docs/current/static/arrays.html The .NET type contained as an element within this array The .NET provider-specific type contained as an element within this array A type handler for the PostgreSQL bit string data type. See https://www.postgresql.org/docs/current/static/datatype-bit.html. Note that for BIT(1), this handler will return a bool by default, to align with SQLClient (see discussion https://github.com/npgsql/npgsql/pull/362#issuecomment-59622101). The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A special handler for arrays of bit strings. Differs from the standard array handlers in that it returns arrays of bool for BIT(1) and arrays of BitArray otherwise (just like the scalar BitStringHandler does). The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL bool data type. See https://www.postgresql.org/docs/current/static/datatype-boolean.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL bytea data type. See https://www.postgresql.org/docs/current/static/datatype-binary.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. The CLR type mapped to the PostgreSQL composite type. A type handler for the PostgreSQL date data type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Constructs a A type handler for the PostgreSQL date interval type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Constructs an A type handler for the PostgreSQL time data type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Constructs a . A type handler for the PostgreSQL timestamp data type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Constructs a . A type handler for the PostgreSQL timestamptz data type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Constructs an . A type handler for the PostgreSQL timetz data type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Constructs an . Interface implemented by all concrete handlers which handle enums The CLR enum type mapped to the PostgreSQL enum A type handler for the PostgreSQL tsquery data type. See https://www.postgresql.org/docs/current/static/datatype-textsearch.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL tsvector data type. See https://www.postgresql.org/docs/current/static/datatype-textsearch.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL box data type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL circle data type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL line data type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL lseg data type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL path data type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL point data type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL polygon data type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL hstore extension data type, which stores sets of key/value pairs within a single PostgreSQL value. See https://www.postgresql.org/docs/current/hstore.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. The text handler to which we delegate encoding/decoding of the actual strings An int2vector is simply a regular array of shorts, with the sole exception that its lower bound must be 0 (we send 1 for regular arrays). A type handler for the PostgreSQL "char" type, used only internally. See https://www.postgresql.org/docs/current/static/datatype-character.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. An OIDVector is simply a regular array of uints, with the sole exception that its lower bound must be 0 (we send 1 for regular arrays). A type handler for the PostgreSQL json and jsonb data type. See https://www.postgresql.org/docs/current/datatype-json.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Prepended to the string in the wire encoding A type handler for the PostgreSQL jsonpath data type. See https://www.postgresql.org/docs/current/datatype-json.html#DATATYPE-JSONPATH. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Prepended to the string in the wire encoding LQuery binary encoding is a simple UTF8 string, but prepended with a version number. Prepended to the string in the wire encoding Ltree binary encoding is a simple UTF8 string, but prepended with a version number. Prepended to the string in the wire encoding LTxtQuery binary encoding is a simple UTF8 string, but prepended with a version number. Prepended to the string in the wire encoding The type handler for the range that this multirange type holds A type handler for the PostgreSQL cidr data type. See https://www.postgresql.org/docs/current/static/datatype-net-types.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL cidr data type. See https://www.postgresql.org/docs/current/static/datatype-net-types.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL macaddr and macaddr8 data types. See https://www.postgresql.org/docs/current/static/datatype-net-types.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL double precision data type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL smallint data type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL integer data type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL bigint data type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL money data type. See https://www.postgresql.org/docs/current/static/datatype-money.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL numeric data type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for the PostgreSQL real data type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for PostgreSQL unsigned 32-bit data types. This is only used for internal types. See https://www.postgresql.org/docs/current/static/datatype-oid.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for PostgreSQL unsigned 64-bit data types. This is only used for internal types. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. A type handler for PostgreSQL range types. See https://www.postgresql.org/docs/current/static/rangetypes.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. The range subtype. The type handler for the subtype that this range type holds Type handler for PostgreSQL range types. Introduced in PostgreSQL 9.2. https://www.postgresql.org/docs/current/static/rangetypes.html The main range subtype. An alternative range subtype. Type handler for PostgreSQL record types. Defaults to returning object[], but can also return or . https://www.postgresql.org/docs/current/static/datatype-pseudo.html Encoding (identical to composite): A 32-bit integer with the number of columns, then for each column: * An OID indicating the type of the column * The length of the column(32-bit integer), or -1 if null * The column data encoded as binary A type handler for PostgreSQL character data types (text, char, varchar, xml...). See https://www.postgresql.org/docs/current/datatype-character.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. Handles "conversions" for columns sent by the database with unknown OIDs. This differs from TextHandler in that its a text-only handler (we don't want to receive binary representations of the types registered here). Note that this handler is also used in the very initial query that loads the OID mappings (chicken and egg problem). Also used for sending parameters with unknown types (OID=0) A type handler for the PostgreSQL uuid data type. See https://www.postgresql.org/docs/current/static/datatype-uuid.html. The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk. https://www.postgresql.org/docs/current/static/datatype-boolean.html Type handlers that wish to support reading other types in additional to the main one can implement this interface for all those types. Reads a value of type with the given length from the provided buffer, with the assumption that it is entirely present in the provided memory buffer and no I/O will be required. The buffer from which to read. The byte length of the value. The buffer might not contain the full length, requiring I/O to be performed. Additional PostgreSQL information about the type, such as the length in varchar(30). The fully-read value. Responsible for validating that a value represents a value of the correct and which can be written for PostgreSQL - if the value cannot be written for any reason, an exception should be thrown. Also returns the byte length needed to write the value. The value to be written to PostgreSQL The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). The number of bytes required to write the value. Writes a value to the provided buffer, with the assumption that there is enough space in the buffer (no I/O will occur). The Npgsql core will have taken care of that. The value to write. The buffer to which to write. The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). Type handlers that wish to support reading other types in additional to the main one can implement this interface for all those types. Reads a value of type with the given length from the provided buffer, using either sync or async I/O. The buffer from which to read. The byte length of the value. The buffer might not contain the full length, requiring I/O to be performed. If I/O is required to read the full length of the value, whether it should be performed synchronously or asynchronously. Additional PostgreSQL information about the type, such as the length in varchar(30). The fully-read value. Responsible for validating that a value represents a value of the correct and which can be written for PostgreSQL - if the value cannot be written for any reason, an exception should be thrown. Also returns the byte length needed to write the value. The value to be written to PostgreSQL A cache where the length calculated during the validation phase can be stored for use at the writing phase. The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). The number of bytes required to write the value. Writes a value to the provided buffer. The value to write. The buffer to which to write. A cache where the length calculated during the validation phase can be stored for use at the writing phase. The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). If I/O will be necessary (i.e. the buffer is full), determines whether it will be done synchronously or asynchronously. An optional token to cancel the asynchronous operation. The default value is . Implemented by handlers which support , returns a standard TextReader given a binary Stream. An array of cached lengths for the parameters sending process. When sending parameters, lengths need to be calculated more than once (once for Bind, once for an array, once for the string within that array). This cache optimizes that. Lengths are added to the cache, and then retrieved in the same order. Stores a length value in the cache, to be fetched later via . Called at the phase. The length parameter. Retrieves a length value previously stored in the cache via . Called at the writing phase, after validation has already occurred and the length cache is populated. Base class for all simple type handlers, which read and write short, non-arbitrary lengthed values to PostgreSQL. Provides a simpler API to implement when compared to - Npgsql takes care of all I/O before calling into this type, so no I/O needs to be performed by it. The default CLR type that this handler will read and write. For example, calling on a column with this handler will return a value with type . Type handlers can support additional types by implementing . Reads a value of type with the given length from the provided buffer, with the assumption that it is entirely present in the provided memory buffer and no I/O will be required. The buffer from which to read. The byte length of the value. The buffer might not contain the full length, requiring I/O to be performed. Additional PostgreSQL information about the type, such as the length in varchar(30). The fully-read value. Responsible for validating that a value represents a value of the correct and which can be written for PostgreSQL - if the value cannot be written for any reason, an exception shold be thrown. Also returns the byte length needed to write the value. The value to be written to PostgreSQL The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). The number of bytes required to write the value. Writes a value to the provided buffer, with the assumption that there is enough space in the buffer (no I/O will occur). The Npgsql core will have taken care of that. The value to write. The buffer to which to write. The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). Simple type handlers override instead of this. Simple type handlers override instead of this. A simple type handler that supports a provider-specific value in addition to its default value. This is necessary mainly in cases where the CLR type cannot represent the full range of the PostgreSQL type, and a custom CLR type is needed. The provider-specific type will be returned from calls to . The default CLR type that this handler will read and write. For example, calling on a column with this handler will return a value with type . Type handlers can support additional types by implementing . The provider-specific CLR type that this handler will read and write. Reads a value of type with the given length from the provided buffer, with the assumption that it is entirely present in the provided memory buffer and no I/O will be required. The buffer from which to read. The byte length of the value. The buffer might not contain the full length, requiring I/O to be performed. Additional PostgreSQL information about the type, such as the length in varchar(30). The fully-read value. Reads a column as the type handler's provider-specific type, assuming that it is already entirely in memory (i.e. no I/O is necessary). Called by in non-sequential mode, which buffers entire rows in memory. Reads a column as the type handler's provider-specific type. If it is not already entirely in memory, sync or async I/O will be performed as specified by . Responsible for validating that a value represents a value of the correct and which can be written for PostgreSQL - if the value cannot be written for any reason, an exception shold be thrown. Also returns the byte length needed to write the value. The value to be written to PostgreSQL The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). The number of bytes required to write the value. Writes a value to the provided buffer, with the assumption that there is enough space in the buffer (no I/O will occur). The Npgsql core will have taken care of that. The value to write. The buffer to which to write. The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). Base class for all type handlers, which read and write CLR types into their PostgreSQL binary representation. Type handler writers shouldn't inherit from this class, inherit or instead. The PostgreSQL type handled by this type handler. Reads a value of type with the given length from the provided buffer, using either sync or async I/O. The buffer from which to read. The byte length of the value. The buffer might not contain the full length, requiring I/O to be performed. If I/O is required to read the full length of the value, whether it should be performed synchronously or asynchronously. Additional PostgreSQL information about the type, such as the length in varchar(30). The fully-read value. Version of that's called when we know the entire value is already buffered in memory (i.e. in non-sequential mode). Reads a column as the type handler's default read type. If it is not already entirely in memory, sync or async I/O will be performed as specified by . Version of that's called when we know the entire value is already buffered in memory (i.e. in non-sequential mode). Reads a column as the type handler's provider-specific type. If it is not already entirely in memory, sync or async I/O will be performed as specified by . Version of that's called when we know the entire value is already buffered in memory (i.e. in non-sequential mode). Reads a value from the buffer, assuming our read position is at the value's preceding length. If the length is -1 (null), this method will return the default value. Called to validate and get the length of a value of a generic . and must be handled before calling into this. Called to write the value of a generic . In the vast majority of cases writing a parameter to the buffer won't need to perform I/O. Typically does not need to be overridden by type handlers, but may be needed in some cases (e.g. . Note that this method assumes it can write 4 bytes of length (already verified by ). Responsible for validating that a value represents a value of the correct and which can be written for PostgreSQL - if the value cannot be written for any reason, an exception shold be thrown. Also returns the byte length needed to write the value. The value to be written to PostgreSQL If the byte length calculation is costly (e.g. for UTF-8 strings), its result can be stored in the length cache to be reused in the writing process, preventing recalculation. The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). The number of bytes required to write the value. Writes a value to the provided buffer, using either sync or async I/O. The value to write. The buffer to which to write. The instance where this value resides. Can be used to access additional information relevant to the write process (e.g. ). If I/O is required to read the full length of the value, whether it should be performed synchronously or asynchronously. An optional token to cancel the asynchronous operation. The default value is . Creates a type handler for arrays of this handler's type. Creates a type handler for ranges of this handler's type. Creates a type handler for multiranges of this handler's type. Used to create an exception when the provided type can be converted and written, but an instance of is required for caching of the converted value (in . Base class for all type handlers, which read and write CLR types into their PostgreSQL binary representation. Unless your type is arbitrary-length, consider inheriting from instead. The default CLR type that this handler will read and write. For example, calling on a column with this handler will return a value with type . Type handlers can support additional types by implementing . Reads a value of type with the given length from the provided buffer, using either sync or async I/O. The buffer from which to read. The byte length of the value. The buffer might not contain the full length, requiring I/O to be performed. If I/O is required to read the full length of the value, whether it should be performed synchronously or asynchronously. Additional PostgreSQL information about the type, such as the length in varchar(30). The fully-read value. Called to validate and get the length of a value of a generic . Called to write the value of a generic . An Npgsql resolver for type handlers. Typically used by plugins to alter how Npgsql reads and writes values to PostgreSQL. Resolves a type handler given a PostgreSQL type name, corresponding to the typname column in the PostgreSQL pg_type catalog table. See . Resolves a type handler given a .NET CLR type. Gets type mapping information for a given PostgreSQL type. Invoked in scenarios when mapping information is required, rather than a type handler for reading or writing. Launches MIT Kerberos klist and parses out the default principal from it. Caches the result. When multiplexing is enabled, determines the maximum number of outgoing bytes to buffer before flushing to the network. A component which translates a CLR name (e.g. SomeClass) into a database name (e.g. some_class) according to some scheme. Used for mapping enum and composite types. Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. Given a CLR member name (property or field), translates its name to a database type name. A name translator which preserves CLR names (e.g. SomeClass) when mapping names to the database. Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. Given a CLR member name (property or field), translates its name to a database type name. A name translator which converts standard CLR names (e.g. SomeClass) to snake-case database names (some_class) Creates a new . Creates a new . Uses the legacy naming convention if , otherwise it uses the new naming convention. Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. Given a CLR member name (property or field), translates its name to a database type name. Converts a string to its snake_case equivalent. The value to convert. This mechanism is used to temporarily set the current synchronization context to null while executing Npgsql code, making all await continuations execute on the thread pool. This replaces the need to place ConfigureAwait(false) everywhere, and should be used in all surface async methods, without exception. Warning: do not use this directly in async methods, use it in sync wrappers of async methods (see https://github.com/npgsql/npgsql/issues/1593) https://stackoverflow.com/a/28307965/640325 Controls whether to place error barriers between all batch commands within this batch. Default to . By default, any exception in a command causes later commands in the batch to be skipped, and earlier commands to be rolled back. Enabling error barriers ensures that errors do not affect other commands in the batch. Note that if the batch is executed within an explicit transaction, the first error places the transaction in a failed state, causing all later commands to fail in any case. As a result, this option is useful mainly when there is no explicit transaction. At the PostgreSQL wire protocol level, this corresponds to inserting a Sync message between each command, rather than grouping all the batch's commands behind a single terminating Sync. To control error barriers on a command-by-command basis, see . Marks all of the batch's result columns as either known or unknown. Unknown results column are requested them from PostgreSQL in text format, and Npgsql makes no attempt to parse them. They will be accessible as strings only. Initializes a new . A that represents the connection to a PostgreSQL server. The in which the executes. Appends an error barrier after this batch command. Defaults to the value of on the batch. By default, any exception in a command causes later commands in the batch to be skipped, and earlier commands to be rolled back. Appending an error barrier ensures that errors from this command (or previous ones) won't cause later commands to be skipped, and that errors from later commands won't cause this command (or previous ones) to be rolled back). Note that if the batch is executed within an explicit transaction, the first error places the transaction in a failed state, causing all later commands to fail in any case. As a result, this option is useful mainly when there is no explicit transaction. At the PostgreSQL wire protocol level, this corresponds to inserting a Sync message after this command, rather than grouping all the batch's commands behind a single terminating Sync. Controlling error barriers on a command-by-command basis is an advanced feature, consider enabling error barriers for the entire batch via . The number of rows affected or retrieved. See the command tag in the CommandComplete message for the meaning of this value for each , https://www.postgresql.org/docs/current/static/protocol-message-formats.html Specifies the type of query, e.g. SELECT. For an INSERT, the object ID of the inserted row if is 1 and the target table has OIDs; otherwise 0. The SQL as it will be sent to PostgreSQL, after any rewriting performed by Npgsql (e.g. named to positional parameter placeholders). The list of parameters, ordered positionally, as it will be sent to PostgreSQL. If the user provided positional parameters, this references the (in batching mode) or the list backing (in non-batching) mode. If the user provided named parameters, this is a separate list containing the re-ordered parameters. The RowDescription message for this query. If null, the query does not return rows (e.g. INSERT) If this statement has been automatically prepared, references the . Null otherwise. Holds the server-side (prepared) statement name. Empty string for non-prepared statements. Whether this statement has already been prepared (including automatic preparation). Returns a prepared statement for this statement (including automatic preparation). Initializes a new . Initializes a new . The text of the . Returns the . Provides an API for a binary COPY TO operation, a high-performance data export mechanism from a PostgreSQL table. Initiated by The number of columns, as returned from the backend in the CopyInResponse. Current timeout Starts reading a single row, must be invoked before reading any columns. The number of columns in the row. -1 if there are no further rows. Note: This will currently be the same value for all rows, but this may change in the future. Starts reading a single row, must be invoked before reading any columns. The number of columns in the row. -1 if there are no further rows. Note: This will currently be the same value for all rows, but this may change in the future. Reads the current column, returns its value and moves ahead to the next column. If the column is null an exception is thrown. The type of the column to be read. This must correspond to the actual type or data corruption will occur. If in doubt, use to manually specify the type. The value of the column Reads the current column, returns its value and moves ahead to the next column. If the column is null an exception is thrown. The type of the column to be read. This must correspond to the actual type or data corruption will occur. If in doubt, use to manually specify the type. The value of the column Reads the current column, returns its value according to and moves ahead to the next column. If the column is null an exception is thrown. In some cases isn't enough to infer the data type coming in from the database. This parameter can be used to unambiguously specify the type. An example is the JSONB type, for which will be a simple string but for which must be specified as . The .NET type of the column to be read. The value of the column Reads the current column, returns its value according to and moves ahead to the next column. If the column is null an exception is thrown. In some cases isn't enough to infer the data type coming in from the database. This parameter can be used to unambiguously specify the type. An example is the JSONB type, for which will be a simple string but for which must be specified as . An optional token to cancel the asynchronous operation. The default value is . The .NET type of the column to be read. The value of the column Returns whether the current column is null. Skips the current column without interpreting its value. Skips the current column without interpreting its value. Cancels an ongoing export. Async cancels an ongoing export. Completes that binary export and sets the connection back to idle state Async completes that binary export and sets the connection back to idle state Provides an API for a binary COPY FROM operation, a high-performance data import mechanism to a PostgreSQL table. Initiated by See https://www.postgresql.org/docs/current/static/sql-copy.html. The number of columns in the current (not-yet-written) row. The number of columns, as returned from the backend in the CopyInResponse. Current timeout Starts writing a single row, must be invoked before writing any columns. Starts writing a single row, must be invoked before writing any columns. Writes a single column in the current row. The value to be written The type of the column to be written. This must correspond to the actual type or data corruption will occur. If in doubt, use to manually specify the type. Writes a single column in the current row. The value to be written An optional token to cancel the asynchronous operation. The default value is . The type of the column to be written. This must correspond to the actual type or data corruption will occur. If in doubt, use to manually specify the type. Writes a single column in the current row as type . The value to be written In some cases isn't enough to infer the data type to be written to the database. This parameter can be used to unambiguously specify the type. An example is the JSONB type, for which will be a simple string but for which must be specified as . The .NET type of the column to be written. Writes a single column in the current row as type . The value to be written In some cases isn't enough to infer the data type to be written to the database. This parameter can be used to unambiguously specify the type. An example is the JSONB type, for which will be a simple string but for which must be specified as . An optional token to cancel the asynchronous operation. The default value is . The .NET type of the column to be written. Writes a single column in the current row as type . The value to be written In some cases isn't enough to infer the data type to be written to the database. This parameter and be used to unambiguously specify the type. The .NET type of the column to be written. Writes a single column in the current row as type . The value to be written In some cases isn't enough to infer the data type to be written to the database. This parameter and be used to unambiguously specify the type. An optional token to cancel the asynchronous operation. The default value is . The .NET type of the column to be written. Writes a single null column value. Writes a single null column value. Writes an entire row of columns. Equivalent to calling , followed by multiple on each value. An array of column values to be written as a single row Writes an entire row of columns. Equivalent to calling , followed by multiple on each value. An optional token to cancel the asynchronous operation. The default value is . An array of column values to be written as a single row Completes the import operation. The writer is unusable after this operation. Completes the import operation. The writer is unusable after this operation. Terminates the ongoing binary import and puts the connection back into the idle state, where regular commands can be executed. Note that if hasn't been invoked before calling this, the import will be cancelled and all changes will be reverted. Async terminates the ongoing binary import and puts the connection back into the idle state, where regular commands can be executed. Note that if hasn't been invoked before calling this, the import will be cancelled and all changes will be reverted. Terminates the ongoing binary import and puts the connection back into the idle state, where regular commands can be executed. Note that if hasn't been invoked before calling this, the import will be cancelled and all changes will be reverted. Async terminates the ongoing binary import and puts the connection back into the idle state, where regular commands can be executed. Note that if hasn't been invoked before calling this, the import will be cancelled and all changes will be reverted. Represents a SQL statement or function (stored procedure) to execute against a PostgreSQL database. This class cannot be inherited. If this command is (explicitly) prepared, references the connector on which the preparation happened. Used to detect when the connector was changed (i.e. connection open/close), meaning that the command is no longer prepared. Whether this is wrapped by an . Returns details about each statement that this command has executed. Is only populated when an Execute* method is called. Whether this command is cached by and returned by . Initializes a new instance of the class. Initializes a new instance of the class with the text of the query. The text of the query. Initializes a new instance of the class with the text of the query and a . The text of the query. A that represents the connection to a PostgreSQL server. Initializes a new instance of the class with the text of the query, a , and the . The text of the query. A that represents the connection to a PostgreSQL server. The in which the executes. Used when this instance is wrapped inside an . Used when this instance is wrapped inside an . Gets or sets the SQL statement or function (stored procedure) to execute at the data source. The SQL statement or function (stored procedure) to execute. The default is an empty string. Gets or sets the wait time (in seconds) before terminating the attempt to execute a command and generating an error. The time (in seconds) to wait for the command to execute. The default value is 30 seconds. Gets or sets a value indicating how the property is to be interpreted. One of the values. The default is . DB connection. Gets or sets the used by this instance of the . The connection to a data source. The default value is . Design time visible. Gets or sets how command results are applied to the DataRow when used by the DbDataAdapter.Update(DataSet) method. One of the values. Returns whether this query will execute as a prepared (compiled) query. Marks all of the query's result columns as either known or unknown. Unknown result columns are requested from PostgreSQL in text format, and Npgsql makes no attempt to parse them. They will be accessible as strings only. Marks the query's result columns as known or unknown, on a column-by-column basis. Unknown result columns are requested from PostgreSQL in text format, and Npgsql makes no attempt to parse them. They will be accessible as strings only. If the query includes several queries (e.g. SELECT 1; SELECT 2), this will only apply to the first one. The rest of the queries will be fetched and parsed as usual. The array size must correspond exactly to the number of result columns the query returns, or an error will be raised. Marks result types to be used when using GetValue on a data reader, on a column-by-column basis. Used for Entity Framework 5-6 compability. Only primitive numerical types and DateTimeOffset are supported. Set the whole array or just a value to null to use default type. The current state of the command Creates a new instance of an object. A object. Creates a new instance of a object. An object. DB parameter collection. Gets the . The parameters of the SQL statement or function (stored procedure). The default is an empty collection. Creates a server-side prepared statement on the PostgreSQL server. This will make repeated future executions of this command much faster. Creates a server-side prepared statement on the PostgreSQL server. This will make repeated future executions of this command much faster. An optional token to cancel the asynchronous operation. The default value is . Unprepares a command, closing server-side statements associated with it. Note that this only affects commands explicitly prepared with , not automatically prepared statements. Unprepares a command, closing server-side statements associated with it. Note that this only affects commands explicitly prepared with , not automatically prepared statements. An optional token to cancel the asynchronous operation. The default value is . Executes a SQL statement against the connection and returns the number of rows affected. The number of rows affected if known; -1 otherwise. Asynchronous version of An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. Executes the query, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored. The first column of the first row in the result set, or a null reference if the result set is empty. Asynchronous version of An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation, with the first column of the first row in the result set, or a null reference if the result set is empty. Executes the command text against the connection. A task representing the operation. Executes the command text against the connection. An instance of . An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation. Executes the against the and returns a . One of the enumeration values that specifies the command behavior. A task representing the operation. An asynchronous version of , which executes the against the and returns a . An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation. An asynchronous version of , which executes the against the and returns a . One of the enumeration values that specifies the command behavior. An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation. DB transaction. This property is ignored by Npgsql. PostgreSQL only supports a single transaction at a given time on a given connection, and all commands implicitly run inside the current transaction started via Attempts to cancel the execution of an . As per the specs, no exception will be thrown by this method in case of failure. Fixes up the text/binary flag on result columns. Since Prepare() describes a statement rather than a portal, the resulting RowDescription will have text format on all result columns. Fix that up. Note that UnknownResultTypeList only applies to the first query, while AllResultTypesAreUnknown applies to all of them. Create a new command based on this one. A new NpgsqlCommand object. Create a new command based on this one. A new NpgsqlCommand object. This event is unsupported by Npgsql. Use instead. This class creates database commands for automatic insert, update and delete operations. Initializes a new instance of the class. Initializes a new instance of the class. The adapter. Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. The beginning character or characters to use. The default is an empty string. Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. The ending character or characters to use. The default is an empty string. This method is responsible to derive the command parameter list with values obtained from function definition. It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. Parameters name will be parameter1, parameter2, ... for CommandType.StoredProcedure and named after the placeholder for CommandType.Text NpgsqlCommand whose function parameters will be obtained. Gets the automatically generated object required to perform insertions at the data source. The automatically generated object required to perform insertions. Gets the automatically generated object required to perform insertions at the data source, optionally using columns for parameter names. If , generate parameter names matching column names, if possible. If , generate @p1, @p2, and so on. The automatically generated object required to perform insertions. Gets the automatically generated System.Data.Common.DbCommand object required to perform updates at the data source. The automatically generated System.Data.Common.DbCommand object required to perform updates. Gets the automatically generated object required to perform updates at the data source, optionally using columns for parameter names. If , generate parameter names matching column names, if possible. If , generate @p1, @p2, and so on. The automatically generated object required to perform updates. Gets the automatically generated System.Data.Common.DbCommand object required to perform deletions at the data source. The automatically generated System.Data.Common.DbCommand object required to perform deletions. Gets the automatically generated object required to perform deletions at the data source, optionally using columns for parameter names. If , generate parameter names matching column names, if possible. If , generate @p1, @p2, and so on. The automatically generated object required to perform deletions. Applies the parameter information. The parameter. The row. Type of the statement. If set to [where clause]. Returns the name of the specified parameter in the format of @p#. The number to be included as part of the parameter's name.. The name of the parameter with the specified number appended as part of the parameter name. Returns the full parameter name, given the partial parameter name. The partial name of the parameter. The full parameter name corresponding to the partial parameter name requested. Returns the placeholder for the parameter in the associated SQL statement. The number to be included as part of the parameter's name. The name of the parameter with the specified number appended. Registers the to handle the event for a . The to be used for the update. Adds an event handler for the event. The sender A instance containing information about the event. Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. The original unquoted identifier. The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. Unquoted identifier parameter cannot be null Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. The identifier that will have its embedded quotes removed. The unquoted identifier, with embedded quotes properly un-escaped. Quoted identifier parameter cannot be null This class represents a connection to a PostgreSQL server. The connection string, without the password after open (unless Persist Security Info=true) The original connection string provided by the user, including the password. The physical connection to the database. This is when the connection is closed, and also when it is open in multiplexing mode and unbound (e.g. not in a transaction). The parsed connection string. Set only after the connection is opened. A cached command handed out by , which is returned when disposed. Useful for reducing allocations. Flag used to make sure we never double-close a connection, returning it twice to the pool. The global type mapper, which contains defaults used by all new connections. Modify mappings on this mapper to affect your entire application. Connection-level type mapping is no longer supported. See the 7.0 release notes for configuring type mapping on NpgsqlDataSource. The default TCP/IP port for PostgreSQL. Maximum value for connection timeout. Tracks when this connection was bound to a physical connector (e.g. at open-time, when a transaction was started...). Initializes a new instance of the class. Initializes a new instance of with the given connection string. The connection used to open the PostgreSQL database. Opens a database connection with the property settings specified by the . This is the asynchronous version of . Do not invoke other methods and properties of the object until the returned Task is complete. An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation. Gets or sets the string used to connect to a PostgreSQL database. See the manual for details. The connection string that includes the server name, the database name, and other parameters needed to establish the initial connection. The default value is an empty string. Gets or sets the delegate used to generate a password for new database connections.

This delegate is executed when a new database connection is opened that requires a password.

The and connection string properties have precedence over this delegate: it will not be executed if a password is specified, or if the specified or default Passfile contains a valid entry.

Due to connection pooling this delegate is only executed when a new physical connection is opened, not when reusing a connection that was previously opened from the pool.

Backend server host name. Backend server port. Gets the time (in seconds) to wait while trying to establish a connection before terminating the attempt and generating an error. The time (in seconds) to wait for a connection to open. The default value is 15 seconds. Gets the time (in seconds) to wait while trying to execute a command before terminating the attempt and generating an error. The time (in seconds) to wait for a command to complete. The default value is 20 seconds. Gets the name of the current database or the database to be used after a connection is opened. The name of the current database or the name of the database to be used after a connection is opened. The default value is the empty string. Gets the string identifying the database server (host and port) The name of the database server (host and port). If the connection uses a Unix-domain socket, the path to that socket is returned. The default value is the empty string. Whether to use Windows integrated security to log in. User name. Gets the current state of the connection. A bitwise combination of the values. The default is Closed. Gets whether the current state of the connection is Open or Closed ConnectionState.Open, ConnectionState.Closed or ConnectionState.Connecting Creates and returns a object associated with the . A object. Creates and returns a object associated with the . A object. Creates and returns a object associated with the . A object. Begins a database transaction with the specified isolation level. The isolation level under which the transaction should run. A object representing the new transaction. Nested transactions are not supported. Begins a database transaction. A object representing the new transaction. Nested transactions are not supported. Transactions created by this method will have the isolation level. Begins a database transaction with the specified isolation level. The isolation level under which the transaction should run. A object representing the new transaction. Nested transactions are not supported. Enlist transaction. Releases the connection. If the connection is pooled, it will be returned to the pool and made available for re-use. If it is non-pooled, the physical connection will be closed. Releases the connection. If the connection is pooled, it will be returned to the pool and made available for re-use. If it is non-pooled, the physical connection will be closed. Releases all resources used by the . when called from ; when being called from the finalizer. Releases all resources used by the . Fires when PostgreSQL notices are received from PostgreSQL. PostgreSQL notices are non-critical messages generated by PostgreSQL, either as a result of a user query (e.g. as a warning or informational notice), or due to outside activity (e.g. if the database administrator initiates a "fast" database shutdown). Note that notices are very different from notifications (see the event). Fires when PostgreSQL notifications are received from PostgreSQL. PostgreSQL notifications are sent when your connection has registered for notifications on a specific channel via the LISTEN command. NOTIFY can be used to generate such notifications, allowing for an inter-connection communication channel. Note that notifications are very different from notices (see the event). Returns whether SSL is being used for the connection. Returns whether SCRAM-SHA256 is being user for the connection Returns whether SCRAM-SHA256-PLUS is being user for the connection Selects the local Secure Sockets Layer (SSL) certificate used for authentication. See When using SSL/TLS, this is a callback that allows customizing how the PostgreSQL-provided certificate is verified. This is an advanced API, consider using or instead. Cannot be used in conjunction with , and . See . The version of the PostgreSQL server we're connected to.

This can only be called when the connection is open.

In case of a development or pre-release version this field will contain the version of the next version to be released from this branch.

The PostgreSQL server version as returned by the server_version option. This can only be called when the connection is open. Process id of backend server. This can only be called when there is an active connection. Reports whether the backend uses the newer integer timestamp representation. Note that the old floating point representation is not supported. Meant for use by type plugins (e.g. NodaTime) The connection's timezone as reported by PostgreSQL, in the IANA/Olson database format. Holds all PostgreSQL parameters received for this connection. Is updated if the values change (e.g. as a result of a SET command). Begins a binary COPY FROM STDIN operation, a high-performance data import mechanism to a PostgreSQL table. A COPY FROM STDIN SQL command A which can be used to write rows and columns See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a binary COPY FROM STDIN operation, a high-performance data import mechanism to a PostgreSQL table. A COPY FROM STDIN SQL command An optional token to cancel the asynchronous operation. The default value is None. A which can be used to write rows and columns See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a binary COPY TO STDOUT operation, a high-performance data export mechanism from a PostgreSQL table. A COPY TO STDOUT SQL command A which can be used to read rows and columns See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a binary COPY TO STDOUT operation, a high-performance data export mechanism from a PostgreSQL table. A COPY TO STDOUT SQL command An optional token to cancel the asynchronous operation. The default value is None. A which can be used to read rows and columns See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a textual COPY FROM STDIN operation, a data import mechanism to a PostgreSQL table. It is the user's responsibility to send the textual input according to the format specified in . A COPY FROM STDIN SQL command A TextWriter that can be used to send textual data. See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a textual COPY FROM STDIN operation, a data import mechanism to a PostgreSQL table. It is the user's responsibility to send the textual input according to the format specified in . A COPY FROM STDIN SQL command An optional token to cancel the asynchronous operation. The default value is None. A TextWriter that can be used to send textual data. See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a textual COPY TO STDOUT operation, a data export mechanism from a PostgreSQL table. It is the user's responsibility to parse the textual input according to the format specified in . A COPY TO STDOUT SQL command A TextReader that can be used to read textual data. See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a textual COPY TO STDOUT operation, a data export mechanism from a PostgreSQL table. It is the user's responsibility to parse the textual input according to the format specified in . A COPY TO STDOUT SQL command An optional token to cancel the asynchronous operation. The default value is None. A TextReader that can be used to read textual data. See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a raw binary COPY operation (TO STDOUT or FROM STDIN), a high-performance data export/import mechanism to a PostgreSQL table. Note that unlike the other COPY API methods, doesn't implement any encoding/decoding and is unsuitable for structured import/export operation. It is useful mainly for exporting a table as an opaque blob, for the purpose of importing it back later. A COPY TO STDOUT or COPY FROM STDIN SQL command A that can be used to read or write raw binary data. See https://www.postgresql.org/docs/current/static/sql-copy.html. Begins a raw binary COPY operation (TO STDOUT or FROM STDIN), a high-performance data export/import mechanism to a PostgreSQL table. Note that unlike the other COPY API methods, doesn't implement any encoding/decoding and is unsuitable for structured import/export operation. It is useful mainly for exporting a table as an opaque blob, for the purpose of importing it back later. A COPY TO STDOUT or COPY FROM STDIN SQL command An optional token to cancel the asynchronous operation. The default value is None. A that can be used to read or write raw binary data. See https://www.postgresql.org/docs/current/static/sql-copy.html. Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and exits immediately. The asynchronous message is delivered via the normal events (, ). The time-out value, in milliseconds, passed to . The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. true if an asynchronous message was received, false if timed out. Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and exits immediately. The asynchronous message is delivered via the normal events (, ). The time-out value is passed to . true if an asynchronous message was received, false if timed out. Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and exits immediately. The asynchronous message is delivered via the normal events (, ). Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and exits immediately. The asynchronous message is delivered via the normal events (, ). The time-out value, in milliseconds. The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. An optional token to cancel the asynchronous operation. The default value is . true if an asynchronous message was received, false if timed out. Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and exits immediately. The asynchronous message is delivered via the normal events (, ). The time-out value as An optional token to cancel the asynchronous operation. The default value is . true if an asynchronous message was received, false if timed out. Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and exits immediately. The asynchronous message is delivered via the normal events (, ). An optional token to cancel the asynchronous operation. The default value is . Checks whether the connection is currently bound to a connector, and if so, returns it via . Binds this connection to a physical connector. This happens when opening a non-multiplexing connection, or when starting a transaction on a multiplexed connection. Ends binding scope to the physical connection and returns it to the pool. Only useful with multiplexing on. After this method is called, under no circumstances the physical connection (connector) should ever be used if multiplexing is on. See #3249. Returns the supported collections Returns the schema collection specified by the collection name. The collection name. The collection specified. Returns the schema collection specified by the collection name filtered by the restrictions. The collection name. The restriction values to filter the results. A description of the restrictions is contained in the Restrictions collection. The collection specified. Asynchronously returns the supported collections. An optional token to cancel the asynchronous operation. The default value is . The collection specified. Asynchronously returns the schema collection specified by the collection name. The collection name. An optional token to cancel the asynchronous operation. The default value is . The collection specified. Asynchronously returns the schema collection specified by the collection name filtered by the restrictions. The collection name. The restriction values to filter the results. A description of the restrictions is contained in the Restrictions collection. An optional token to cancel the asynchronous operation. The default value is . The collection specified. Creates a closed connection with the connection string and authentication details of this message. Clones this connection, replacing its connection string with the given one. This allows creating a new connection with the same security information (password, SSL callbacks) while changing other connection parameters (e.g. database or pooling) This method changes the current database by disconnecting from the actual database and connecting to the specified. The name of the database to use in place of the current database. DB provider factory. Clears the connection pool. All idle physical connections in the pool of the given connection are immediately closed, and any busy connections which were opened before was called will be closed when returned to the pool. Clear all connection pools. All idle physical connections in all pools are immediately closed, and any busy connections which were opened before was called will be closed when returned to their pool. Unprepares all prepared statements on this connection. Flushes the type cache for this connection's connection string and reloads the types for this connection only. Type changes will appear for other connections only after they are re-opened from the pool. Flushes the type cache for this connection's connection string and reloads the types for this connection only. Type changes will appear for other connections only after they are re-opened from the pool. This event is unsupported by Npgsql. Use instead. The connection is currently not bound to a connector. The connection is bound to its connector for the scope of the entire connection (i.e. non-multiplexed connection). The connection is bound to its connector for the scope of a transaction. The connection is bound to its connector for the scope of a COPY operation. The connection is bound to its connector for the scope of a single reader. The connection is bound to its connector for an unspecified, temporary scope; the code that initiated the binding is also responsible to unbind it. Represents a method that handles the event. The source of the event. A that contains the notice information (e.g. message, severity...). Represents a method that handles the event. The source of the event. A that contains the notification payload. Represents a method that allows the application to provide a certificate collection to be used for SSL client authentication A to be filled with one or more client certificates. Represents a method that allows the application to provide a password at connection time in code rather than configuration Hostname Port Database Name User A valid password for connecting to the database Provides a simple way to create and manage the contents of connection strings used by the class. Cached DataSource value to reduce allocations on NpgsqlConnection.DataSource.get Initializes a new instance of the NpgsqlConnectionStringBuilder class. Initializes a new instance of the NpgsqlConnectionStringBuilder class, optionally using ODBC rules for quoting values. true to use {} to delimit fields; false to use quotation marks. Initializes a new instance of the NpgsqlConnectionStringBuilder class and sets its . Gets or sets the value associated with the specified key. The key of the item to get or set. The value associated with the specified key. Adds an item to the . The key-value pair to be added. Removes the entry with the specified key from the DbConnectionStringBuilder instance. The key of the key/value pair to be removed from the connection string in this DbConnectionStringBuilder. true if the key existed within the connection string and was removed; false if the key did not exist. Removes the entry from the DbConnectionStringBuilder instance. The key/value pair to be removed from the connection string in this DbConnectionStringBuilder. true if the key existed within the connection string and was removed; false if the key did not exist. Clears the contents of the instance. Determines whether the contains a specific key. The key to locate in the . true if the contains an entry with the specified key; otherwise false. Determines whether the contains a specific key-value pair. The item to locate in the . true if the contains the entry; otherwise false. Retrieves a value corresponding to the supplied key from this . The key of the item to retrieve. The value corresponding to the key. true if keyword was found within the connection string, false otherwise. The hostname or IP address of the PostgreSQL server to connect to. The TCP/IP port of the PostgreSQL server. The PostgreSQL database to connect to. The username to connect with. Not required if using IntegratedSecurity. The password to connect with. Not required if using IntegratedSecurity. Path to a PostgreSQL password file (PGPASSFILE), from which the password would be taken. The optional application name parameter to be sent to the backend during connection initiation. Whether to enlist in an ambient TransactionScope. Gets or sets the schema search path. Gets or sets the client_encoding parameter. Gets or sets the .NET encoding that will be used to encode/decode PostgreSQL string data. Gets or sets the PostgreSQL session timezone, in Olson/IANA database format. Controls whether SSL is required, disabled or preferred, depending on server support. Whether to trust the server certificate without validating it. Location of a client certificate to be sent to the server. Location of a client key for a client certificate to be sent to the server. Password for a key for a client certificate. Location of a CA certificate used to validate the server certificate. Whether to check the certificate revocation list during authentication. False by default. Whether to use Windows integrated security to log in. The Kerberos service name to be used for authentication. The Kerberos realm to be used for authentication. Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. When enabled, parameter values are logged when commands are executed. Defaults to false. When enabled, PostgreSQL error details are included on and . These can contain sensitive data. Whether connection pooling should be used. The minimum connection pool size. The maximum connection pool size. The time to wait before closing idle connections in the pool if the count of all connections exceeds MinPoolSize. The time (in seconds) to wait. The default value is 300. How many seconds the pool waits before attempting to prune idle connections that are beyond idle lifetime (. The interval (in seconds). The default value is 10. The total maximum lifetime of connections (in seconds). Connections which have exceeded this value will be destroyed instead of returned from the pool. This is useful in clustered configurations to force load balancing between a running server and a server just brought online. The time (in seconds) to wait, or 0 to to make connections last indefinitely (the default). The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. Defaults to 15 seconds. The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. Defaults to 30 seconds. The time to wait (in seconds) while trying to execute a an internal command before terminating the attempt and generating an error. The time to wait (in milliseconds) while trying to read a response for a cancellation request for a timed out or cancelled query, before terminating the attempt and generating an error. Zero for infinity, -1 to skip the wait. Defaults to 2000 milliseconds. Determines the preferred PostgreSQL target server type. Enables balancing between multiple hosts by round-robin. Controls for how long the host's cached state will be considered as valid. The database template to specify when creating a database in Entity Framework. If not specified, PostgreSQL defaults to "template1". https://www.postgresql.org/docs/current/static/manage-ag-templatedbs.html The database admin to specify when creating and dropping a database in Entity Framework. This is needed because Npgsql needs to connect to a database in order to send the create/drop database command. If not specified, defaults to "template1". Check NpgsqlServices.UsingPostgresDBConnection for more information. The number of seconds of connection inactivity before Npgsql sends a keepalive query. Set to 0 (the default) to disable. Whether to use TCP keepalive with system defaults if overrides isn't specified. The number of seconds of connection inactivity before a TCP keepalive query is sent. Use of this option is discouraged, use instead if possible. Set to 0 (the default) to disable. The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received. Defaults to the value of . must be non-zero as well. Determines the size of the internal buffer Npgsql uses when reading. Increasing may improve performance if transferring large values from the database. Determines the size of the internal buffer Npgsql uses when writing. Increasing may improve performance if transferring large values to the database. Determines the size of socket read buffer. Determines the size of socket send buffer. The maximum number SQL statements that can be automatically prepared at any given point. Beyond this number the least-recently-used statement will be recycled. Zero (the default) disables automatic preparation. The minimum number of usages an SQL statement is used before it's automatically prepared. Defaults to 5. If set to true, a pool connection's state won't be reset when it is closed (improves performance). Do not specify this unless you know what you're doing. Load table composite type definitions, and not just free-standing composite types. Set the replication mode of the connection This property and its corresponding enum are intentionally kept internal as they should not be set by users or even be visible in their connection strings. Replication connections are a special kind of connection that is encapsulated in and . Set PostgreSQL configuration parameter default values for the connection. Configure the way arrays of value types are returned when requested as object instances. Enables multiplexing, which allows more efficient use of connections. When multiplexing is enabled, determines the maximum number of outgoing bytes to buffer before flushing to the network. A compatibility mode for special PostgreSQL server types. Obsolete, see https://www.npgsql.org/doc/release-notes/6.0.html Obsolete, see https://www.npgsql.org/doc/release-notes/3.1.html Obsolete, see https://www.npgsql.org/doc/release-notes/3.1.html Obsolete, see https://www.npgsql.org/doc/release-notes/3.0.html Obsolete, see https://www.npgsql.org/doc/release-notes/3.0.html Obsolete, see https://www.npgsql.org/doc/release-notes/4.1.html Writes connection performance information to performance counters. Location of a client certificate to be sent to the server. Key for a client certificate to be sent to the server. When enabled, PostgreSQL error details are included on and . These can contain sensitive data. Determines whether the specified object is equal to the current object. Hash function. Gets an containing the keys of the . Gets an containing the values in the . Copies the elements of the to an Array, starting at a particular Array index. The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. The zero-based index in array at which copying begins. Returns an enumerator that iterates through the . Marks on which participate in the connection string. Optionally holds a set of synonyms for the property. Holds a list of synonyms for the property. Creates a . Creates a . An option specified in the connection string that activates special compatibility features. No special server compatibility mode is active The server is an Amazon Redshift instance. The server is doesn't support full type loading from the PostgreSQL catalogs, support the basic set of types via information hardcoded inside Npgsql. Specifies how to manage SSL. SSL is disabled. If the server requires SSL, the connection will fail. Prefer non-SSL connections if the server allows them, but allow SSL connections. Prefer SSL connections if the server allows them, but allow connections without SSL. Fail the connection if the server doesn't support SSL. Fail the connection if the server doesn't support SSL. Also verifies server certificate. Fail the connection if the server doesn't support SSL. Also verifies server certificate with host's name. Specifies how the mapping of arrays of value types behaves with respect to nullability when they are requested via an API returning an . Arrays of value types are always returned as non-nullable arrays (e.g. int[]). If the PostgreSQL array contains a NULL value, an exception is thrown. This is the default mode. Arrays of value types are always returned as nullable arrays (e.g. int?[]). The type of array that gets returned is determined at runtime. Arrays of value types are returned as non-nullable arrays (e.g. int[]) if the actual instance that gets returned doesn't contain null values and as nullable arrays (e.g. int?[]) if it does. When using this setting, make sure that your code is prepared to the fact that the actual type of array instances returned from APIs like may change on a row by row base. Specifies whether the connection shall be initialized as a physical or logical replication connection This enum and its corresponding property are intentionally kept internal as they should not be set by users or even be visible in their connection strings. Replication connections are a special kind of connection that is encapsulated in and . Replication disabled. This is the default Physical replication enabled Logical replication enabled Represents the method that handles the events. The source of the event. An that contains the event data. Represents the method that handles the events. The source of the event. An that contains the event data. This class represents an adapter from many commands: select, update, insert and delete to fill a . Row updated event. Row updating event. Default constructor. Constructor. Constructor. Constructor. Create row updated event. Create row updating event. Raise the RowUpdated event. Raise the RowUpdating event. Delete command. Select command. Update command. Insert command. Reads a forward-only stream of rows from a data source. The behavior of the command with which this reader was executed. In multiplexing, this is as the sending is managed in the write multiplexing loop, and does not need to be awaited by the reader. Holds the list of statements being executed by this reader. The index of the current query resultset we're processing (within a multiquery) The number of columns in the current row Records, for each column, its starting offset and length in the current row. Used only in non-sequential mode. The index of the column that we're on, i.e. that has already been parsed, is is memory and can be retrieved. Initialized to -1, which means we're on the column count (which comes before the first column). For streaming types (e.g. bytea), holds the byte length of the column. Does not include the length prefix. The position in the buffer at which the current data row message ends. Used only when the row is consumed non-sequentially. Determines, if we can consume the row non-sequentially. Mostly useful for a sequential mode, when the row is already in the buffer. Should always be true for the non-sequential mode. The RowDescription message for the current resultset being processed Whether the current result set has rows Is raised whenever Close() is called. A stream that has been opened on a column. Used for internal temporary purposes Used to keep track of every unique row this reader object ever traverses. This is used to detect whether nested DbDataReaders are still valid. Advances the reader to the next record in a result set. true if there are more rows; otherwise false. The default position of a data reader is before the first record. Therefore, you must call Read to begin accessing data. This is the asynchronous version of An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation. Advances the reader to the next result when reading the results of a batch of statements. This is the asynchronous version of NextResult. An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous operation. Internal implementation of NextResult Note that in SchemaOnly mode there are no resultsets, and we read nothing from the backend (all RowDescriptions have already been processed and are available) Gets a value indicating the depth of nesting for the current row. Always returns zero. Gets a value indicating whether the data reader is closed. Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. The number of rows changed, inserted, or deleted. -1 for SELECT statements; 0 if no rows were affected or the statement failed. Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. The number of rows changed, inserted, or deleted. 0 for SELECT statements, if no rows were affected or the statement failed. Returns details about each statement that this reader will or has executed. Note that some fields (i.e. rows and oid) are only populated as the reader traverses the result. For commands with multiple queries, this exposes the number of rows affected on a statement-by-statement basis, unlike which exposes an aggregation across all statements. Gets a value that indicates whether this DbDataReader contains one or more rows. Indicates whether the reader is currently positioned on a row, i.e. whether reading a column is possible. This property is different from in that will return true even if attempting to read a column will fail, e.g. before has been called Gets the name of the column, given the zero-based column ordinal. The zero-based column ordinal. The name of the specified column. Gets the number of columns in the current row. Consumes all result sets for this reader, leaving the connector ready for sending and processing further queries Releases the resources used by the . Releases the resources used by the . Closes the reader, allowing a new command to be executed. Closes the reader, allowing a new command to be executed. Gets the value of the specified column as a Boolean. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a byte. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a single character. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a 16-bit signed integer. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a 32-bit signed integer. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a 64-bit signed integer. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a object. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as an instance of . The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a object. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a double-precision floating point number. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a single-precision floating point number. The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a globally-unique identifier (GUID). The zero-based column ordinal. The value of the specified column. Populates an array of objects with the column values of the current row. An array of Object into which to copy the attribute columns. The number of instances of in the array. Gets the value of the specified column as an instance of . The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as a TimeSpan, PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds and ranges from roughly -29247 to 29247 years. See https://www.postgresql.org/docs/current/static/datatype-datetime.html The zero-based column ordinal. The value of the specified column. Returns a nested data reader for the requested column. The column type must be a record or a to Npgsql known composite type, or an array thereof. Currently only supported in non-sequential mode. The zero-based column ordinal. A data reader. Reads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. The zero-based column ordinal. The index within the row from which to begin the read operation. The buffer into which to copy the data. The index with the buffer to which the data will be copied. The maximum number of characters to read. The actual number of bytes read. Retrieves data as a . The zero-based column ordinal. The returned object. Retrieves data as a . The zero-based column ordinal. An optional token to cancel the asynchronous operation. The default value is . The returned object. Reads a stream of characters from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. The zero-based column ordinal. The index within the row from which to begin the read operation. The buffer into which to copy the data. The index with the buffer to which the data will be copied. The maximum number of characters to read. The actual number of characters read. Retrieves data as a . The zero-based column ordinal. The returned object. Retrieves data as a . The zero-based column ordinal. An optional token to cancel the asynchronous operation. The default value is . The returned object. Asynchronously gets the value of the specified column as a type. The type of the value to be returned. The type of the value to be returned. An optional token to cancel the asynchronous operation. The default value is . Synchronously gets the value of the specified column as a type. Synchronously gets the value of the specified column as a type. The column to be retrieved. The column to be retrieved. Gets the value of the specified column as an instance of . The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as an instance of . The zero-based column ordinal. The value of the specified column. Gets the value of the specified column as an instance of . The name of the column. The value of the specified column. Gets a value that indicates whether the column contains nonexistent or missing values. The zero-based column ordinal. true if the specified column is equivalent to ; otherwise false. An asynchronous version of , which gets a value that indicates whether the column contains non-existent or missing values. The parameter is currently ignored. The zero-based column to be retrieved. An optional token to cancel the asynchronous operation. The default value is . true if the specified column value is equivalent to otherwise false. Gets the column ordinal given the name of the column. The name of the column. The zero-based column ordinal. Gets a representation of the PostgreSQL data type for the specified field. The returned representation can be used to access various information about the field. The zero-based column index. Gets the data type information for the specified field. This is the PostgreSQL type name (e.g. double precision), not the .NET type (see for that). The zero-based column index. Gets the OID for the PostgreSQL type for the specified field, as it appears in the pg_type table. This is a PostgreSQL-internal value that should not be relied upon and should only be used for debugging purposes. The zero-based column index. Gets the data type of the specified column. The zero-based column ordinal. The data type of the specified column. Returns the provider-specific field type of the specified column. The zero-based column ordinal. The Type object that describes the data type of the specified column. Gets all provider-specific attribute columns in the collection for the current row. An array of Object into which to copy the attribute columns. The number of instances of in the array. Returns an that can be used to iterate through the rows in the data reader. An that can be used to iterate through the rows in the data reader. Returns schema information for the columns in the current resultset. Asynchronously returns schema information for the columns in the current resultset. Returns a System.Data.DataTable that describes the column metadata of the DataReader. Asynchronously returns a System.Data.DataTable that describes the column metadata of the DataReader. Seeks to the given column. The 4-byte length is read and stored in . Checks that we have a RowDescription, but not necessary an actual resultset (for operations which work in SchemaOnly mode. Unbinds reader from the connector. Should be called before the connector is returned to the pool. Contains the connection string returned to the user from after the connection has been opened. Does not contain the password unless Persist Security Info=true. Information about PostgreSQL and PostgreSQL-like databases (e.g. type definitions, capabilities...). Semaphore to ensure we don't perform type loading and mapping setup concurrently for this data source. Returns a new, unopened connection from this data source. Returns a new, opened connection from this data source. Returns a new, opened connection from this data source. An optional token to cancel the asynchronous operation. The default value is . Creates a command ready for use against this . An optional SQL for the command. Creates a batch ready for use against this . Creates a new for the given . Creates a new for the given . Manually sets the password to be used the next time a physical connection is opened. Consider using instead. Provides a simple API for configuring and creating an , from which database connections can be obtained. A connection string builder that can be used to configured the connection string on the builder. Returns the connection string, as currently configured on the builder. Constructs a new , optionally starting out from the given . Sets the that will be used for logging. The logger factory to be used. The same builder instance so that multiple calls can be chained. Enables parameters to be included in logging. This includes potentially sensitive information from data sent to PostgreSQL. You should only enable this flag in development, or if you have the appropriate security measures in place based on the sensitivity of this data. If , then sensitive data is logged. The same builder instance so that multiple calls can be chained. When using SSL/TLS, this is a callback that allows customizing how the PostgreSQL-provided certificate is verified. This is an advanced API, consider using or instead. The callback containing custom callback verification logic. Cannot be used in conjunction with , or . See . The same builder instance so that multiple calls can be chained. Specifies an SSL/TLS certificate which Npgsql will send to PostgreSQL for certificate-based authentication. The client certificate to be sent to PostgreSQL when opening a connection. The same builder instance so that multiple calls can be chained. Specifies a collection of SSL/TLS certificates which Npgsql will send to PostgreSQL for certificate-based authentication. The client certificate collection to be sent to PostgreSQL when opening a connection. The same builder instance so that multiple calls can be chained. Specifies a callback to modify the collection of SSL/TLS client certificates which Npgsql will send to PostgreSQL for certificate-based authentication. This is an advanced API, consider using or instead. The callback to modify the client certificate collection. The callback is invoked every time a physical connection is opened, and is therefore suitable for rotating short-lived client certificates. Simply make sure the certificate collection argument has the up-to-date certificate(s). The callback's collection argument already includes any client certificates specified via the connection string or environment variables. The same builder instance so that multiple calls can be chained. Configures a periodic password provider, which is automatically called by the data source at some regular interval. This is the recommended way to fetch a rotating access token. A callback which returns the password to be sent to PostgreSQL. How long to cache the password before re-invoking the callback. If a password refresh attempt fails, it will be re-attempted with this interval. This should typically be much lower than . The same builder instance so that multiple calls can be chained. The provided callback is invoked in a timer, and not when opening connections. It therefore doesn't affect opening time. The provided cancellation token is only triggered when the entire data source is disposed. If you'd like to apply a timeout to the token fetching, do so within the provided callback. Register a connection initializer, which allows executing arbitrary commands when a physical database connection is first opened. A synchronous connection initialization lambda, which will be called from when a new physical connection is opened. An asynchronous connection initialization lambda, which will be called from when a new physical connection is opened. If an initializer is registered, both sync and async versions must be provided. If you do not use sync APIs in your code, simply throw , which would also catch accidental cases of sync opening. Take care that the setting you apply in the initializer does not get reverted when the connection is returned to the pool, since Npgsql sends DISCARD ALL by default. The option can be used to turn this off. The same builder instance so that multiple calls can be chained. Builds and returns an which is ready for use. Builds and returns a which is ready for use for load-balancing and failover scenarios. The exception that is thrown when server-related issues occur. PostgreSQL errors (e.g. query SQL issues, constraint violations) are raised via which is a subclass of this class. Purely Npgsql-related issues which aren't related to the server will be raised via the standard CLR exceptions (e.g. ArgumentException). Initializes a new instance of the class. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Initializes a new instance of the class with a specified error message. The message that describes the error. Specifies whether the exception is considered transient, that is, whether retrying the operation could succeed (e.g. a network error or a timeout). If the exception was thrown as a result of executing a , references the within the batch which triggered the exception. Otherwise . Initializes a new instance of the class with serialized data. The SerializationInfo that holds the serialized object data about the exception being thrown. The StreamingContext that contains contextual information about the source or destination. A factory to create instances of various Npgsql objects. Gets an instance of the . This can be used to retrieve strongly typed data objects. Returns a strongly typed instance. Returns a strongly typed instance. Returns a strongly typed instance. Returns a strongly typed instance. Returns a strongly typed instance. Returns a strongly typed instance. Gets the service object of the specified type. An object that specifies the type of service object to get. A service object of type serviceType, or null if there is no service object of type serviceType. Large object manager. This class can be used to store very large files in a PostgreSQL database. The largest chunk size (in bytes) read and write operations will read/write each roundtrip to the network. Default 4 MB. Creates an NpgsqlLargeObjectManager for this connection. The connection must be opened to perform remote operations. Execute a function Execute a function that returns a byte array Create an empty large object in the database. If an oid is specified but is already in use, an PostgresException will be thrown. A preferred oid, or specify 0 if one should be automatically assigned The oid for the large object created If an oid is already in use Create an empty large object in the database. If an oid is specified but is already in use, an PostgresException will be thrown. A preferred oid, or specify 0 if one should be automatically assigned An optional token to cancel the asynchronous operation. The default value is . The oid for the large object created If an oid is already in use Opens a large object on the backend, returning a stream controlling this remote object. A transaction snapshot is taken by the backend when the object is opened with only read permissions. When reading from this object, the contents reflects the time when the snapshot was taken. Note that this method, as well as operations on the stream must be wrapped inside a transaction. Oid of the object An NpgsqlLargeObjectStream Opens a large object on the backend, returning a stream controlling this remote object. A transaction snapshot is taken by the backend when the object is opened with only read permissions. When reading from this object, the contents reflects the time when the snapshot was taken. Note that this method, as well as operations on the stream must be wrapped inside a transaction. Oid of the object An optional token to cancel the asynchronous operation. The default value is . An NpgsqlLargeObjectStream Opens a large object on the backend, returning a stream controlling this remote object. Note that this method, as well as operations on the stream must be wrapped inside a transaction. Oid of the object An NpgsqlLargeObjectStream Opens a large object on the backend, returning a stream controlling this remote object. Note that this method, as well as operations on the stream must be wrapped inside a transaction. Oid of the object An optional token to cancel the asynchronous operation. The default value is . An NpgsqlLargeObjectStream Deletes a large object on the backend. Oid of the object to delete Deletes a large object on the backend. Oid of the object to delete An optional token to cancel the asynchronous operation. The default value is . Exports a large object stored in the database to a file on the backend. This requires superuser permissions. Oid of the object to export Path to write the file on the backend Exports a large object stored in the database to a file on the backend. This requires superuser permissions. Oid of the object to export Path to write the file on the backend An optional token to cancel the asynchronous operation. The default value is . Imports a large object to be stored as a large object in the database from a file stored on the backend. This requires superuser permissions. Path to read the file on the backend A preferred oid, or specify 0 if one should be automatically assigned Imports a large object to be stored as a large object in the database from a file stored on the backend. This requires superuser permissions. Path to read the file on the backend A preferred oid, or specify 0 if one should be automatically assigned An optional token to cancel the asynchronous operation. The default value is . Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. This property returns true whether the PostgreSQL version is >= 9.3. An interface to remotely control the seekable stream for an opened large object on a PostgreSQL server. Note that the OpenRead/OpenReadWrite method as well as all operations performed on this stream must be wrapped inside a database transaction. Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. This property returns true whether the PostgreSQL version is >= 9.3. Reads count bytes from the large object. The only case when fewer bytes are read is when end of stream is reached. The buffer where read data should be stored. The offset in the buffer where the first byte should be read. The maximum number of bytes that should be read. How many bytes actually read, or 0 if end of file was already reached. Reads count bytes from the large object. The only case when fewer bytes are read is when end of stream is reached. The buffer where read data should be stored. The offset in the buffer where the first byte should be read. The maximum number of bytes that should be read. An optional token to cancel the asynchronous operation. The default value is . How many bytes actually read, or 0 if end of file was already reached. Writes count bytes to the large object. The buffer to write data from. The offset in the buffer at which to begin copying bytes. The number of bytes to write. Writes count bytes to the large object. The buffer to write data from. The offset in the buffer at which to begin copying bytes. The number of bytes to write. An optional token to cancel the asynchronous operation. The default value is . CanTimeout always returns false. CanRead always returns true, unless the stream has been closed. CanWrite returns true if the stream was opened with write permissions, and the stream has not been closed. CanSeek always returns true, unless the stream has been closed. Returns the current position in the stream. Getting the current position does not need a round-trip to the server, however setting the current position does. Gets the length of the large object. This internally seeks to the end of the stream to retrieve the length, and then back again. Gets the length of the large object. This internally seeks to the end of the stream to retrieve the length, and then back again. An optional token to cancel the asynchronous operation. The default value is . Seeks in the stream to the specified position. This requires a round-trip to the backend. A byte offset relative to the origin parameter. A value of type SeekOrigin indicating the reference point used to obtain the new position. Seeks in the stream to the specified position. This requires a round-trip to the backend. A byte offset relative to the origin parameter. A value of type SeekOrigin indicating the reference point used to obtain the new position. An optional token to cancel the asynchronous operation. The default value is . Does nothing. Truncates or enlarges the large object to the given size. If enlarging, the large object is extended with null bytes. For PostgreSQL versions earlier than 9.3, the value must fit in an Int32. Number of bytes to either truncate or enlarge the large object. Truncates or enlarges the large object to the given size. If enlarging, the large object is extended with null bytes. For PostgreSQL versions earlier than 9.3, the value must fit in an Int32. Number of bytes to either truncate or enlarge the large object. An optional token to cancel the asynchronous operation. The default value is . Releases resources at the backend allocated for this stream. Releases resources at the backend allocated for this stream, iff disposing is true. Whether to release resources allocated at the backend. Configures Npgsql logging Determines whether parameter contents will be logged alongside SQL statements - this may reveal sensitive information. Defaults to false. Globally initializes Npgsql logging to use the provided . Must be called before any Npgsql APIs are used. This is a legacy-only, backwards compatibility API. New applications should set the logger factory on and use the resulting instead. The logging factory to use when logging from Npgsql. Determines whether parameter contents will be logged alongside SQL statements - this may reveal sensitive information. Defaults to . An which manages connections for multiple hosts, is aware of their states (primary, secondary, offline...) and can perform failover and load balancing across them. See . Returns a new, unopened connection from this data source. Specifies the server type (e.g. primary, standby). Returns a new, opened connection from this data source. Specifies the server type (e.g. primary, standby). Returns a new, opened connection from this data source. Specifies the server type (e.g. primary, standby). An optional token to cancel the asynchronous operation. The default value is . Returns an that wraps this multi-host one with the given server type. Specifies the server type (e.g. primary, standby). Clears the database state (primary, secondary, offline...) for all data sources managed by this multi-host data source. Can be useful to make Npgsql retry a PostgreSQL instance which was previously detected to be offline. Reads a forward-only stream of rows from a nested data source. Can be retrieved using or . Returns a nested data reader for the requested column. The column type must be a record or a to Npgsql known composite type, or an array thereof. The zero-based column ordinal. A data reader. Provides information on a PostgreSQL notification. Notifications are sent when your connection has registered for notifications on a specific channel via the LISTEN command. NOTIFY can be used to generate such notifications, allowing for an inter-connection communication channel. Process ID of the PostgreSQL backend that sent this notification. The channel on which the notification was sent. An optional payload string that was sent with this notification. The channel on which the notification was sent. An optional payload string that was sent with this notification. Thrown when trying to use a connection that is already busy performing some other operation. Provides information on the already-executing operation to help with debugging. Creates a new instance of . A command which was in progress when the operation which triggered this exception was executed. If the connection is busy with another command, this will contain a reference to that command. Otherwise, if the connection if busy with another type of operation (e.g. COPY), contains . This class represents a parameter to a command that will be sent to server Can be used to communicate a value from the validation phase to the writing phase. To be used by type handlers only. Initializes a new instance of the class. Initializes a new instance of the class with the parameter name and a value. The name of the parameter to map. The value of the .

When you specify an in the value parameter, the is inferred from the CLR type.

When using this constructor, you must be aware of a possible misuse of the constructor which takes a parameter. This happens when calling this constructor passing an int 0 and the compiler thinks you are passing a value of . Use for example to have compiler calling the correct constructor.

Initializes a new instance of the class with the parameter name and the data type. The name of the parameter to map. One of the values. Initializes a new instance of the . The name of the parameter to map. One of the values. Initializes a new instance of the . The name of the parameter to map. One of the values. The length of the parameter. Initializes a new instance of the . The name of the parameter to map. One of the values. The length of the parameter. Initializes a new instance of the The name of the parameter to map. One of the values. The length of the parameter. The name of the source column. Initializes a new instance of the . The name of the parameter to map. One of the values. The length of the parameter. The name of the source column. Initializes a new instance of the . The name of the parameter to map. One of the values. The length of the parameter. The name of the source column. One of the values. if the value of the field can be , otherwise . The total number of digits to the left and right of the decimal point to which is resolved. The total number of decimal places to which is resolved. One of the values. An that is the value of the . Initializes a new instance of the . The name of the parameter to map. One of the values. The length of the parameter. The name of the source column. One of the values. if the value of the field can be , otherwise . The total number of digits to the left and right of the decimal point to which is resolved. The total number of decimal places to which is resolved. One of the values. An that is the value of the . Gets or sets The name of the . The name of the . The default is an empty string. Gets or sets the value of the parameter. An that is the value of the parameter. The default value is . Gets or sets the of the parameter. One of the values. The default is . Gets or sets the of the parameter. One of the values. The default is . Used to specify which PostgreSQL type will be sent to the database for this parameter. Gets or sets the maximum number of digits used to represent the property. The maximum number of digits used to represent the property. The default value is 0, which indicates that the data provider sets the precision for . Gets or sets the number of decimal places to which is resolved. The number of decimal places to which is resolved. The default is 0. The collection to which this parameter belongs, if any. The PostgreSQL data type, such as int4 or text, as discovered from pg_type. This property is automatically set if parameters have been derived via and can be used to acquire additional information about the parameters' data type. Creates a new that is a copy of the current instance. A new that is a copy of this instance. Represents a collection of parameters relevant to a as well as their respective mappings to columns in a . Initializes a new instance of the NpgsqlParameterCollection class. Gets the with the specified name. The name of the to retrieve. The with the specified name, or a reference if the parameter is not found. Gets the at the specified index. The zero-based index of the to retrieve. The at the specified index. Adds the specified object to the . The to add to the collection. The index of the new object. Adds a to the given the specified parameter name and value. The name of the . The value of the to add to the collection. The parameter that was added. Adds a to the given the specified parameter name, data type and value. The name of the . One of the NpgsqlDbType values. The value of the to add to the collection. The parameter that was added. Adds a to the given the specified parameter name and value. The name of the . The value of the to add to the collection. One of the values. The length of the column. The parameter that was added. Adds a to the given the specified parameter name and value. The name of the . The value of the to add to the collection. One of the values. The length of the column. The name of the source column. The parameter that was added. Adds a to the given the specified value. The value of the to add to the collection. The parameter that was added. Adds a to the given the specified data type and value. One of the values. The value of the to add to the collection. The parameter that was added. Adds a to the given the parameter name and the data type. The name of the parameter. One of the values. The index of the new object. Adds a to the with the parameter name, the data type, and the column length. The name of the parameter. One of the values. The length of the column. The index of the new object. Adds a to the with the parameter name, the data type, the column length, and the source column name. The name of the parameter. One of the values. The length of the column. The name of the source column. The index of the new object. Removes the specified from the collection using a specific index. The zero-based index of the parameter. Removes the specified from the collection. The name of the to remove from the collection. Removes the specified from the collection. The to remove from the collection. Gets a value indicating whether a with the specified parameter name exists in the collection. The name of the object to find. A reference to the requested parameter is returned in this out param if it is found in the list. This value is if the parameter is not found. if the collection contains the parameter and param will contain the parameter; otherwise, . Removes all items from the collection. Gets the number of objects in the collection. The number of objects in the collection. Report the offset within the collection of the given parameter. Parameter to find. Index of the parameter, or -1 if the parameter is not present. Insert the specified parameter into the collection. Index of the existing parameter before which to insert the new one. Parameter to insert. Report whether the specified parameter is present in the collection. Parameter to find. True if the parameter was found, otherwise false. Remove the specified parameter from the collection. Parameter to remove. True if the parameter was found and removed, otherwise false. Convert collection to a System.Array. Destination array. Starting index in destination array. Convert collection to a System.Array. NpgsqlParameter[] The parameter collection includes no parameters. The parameter collection includes only named parameters. The parameter collection includes only positional parameters. The parameter collection includes both named and positional parameters. This is only supported when is set to . A generic version of which provides more type safety and avoids boxing of value types. Use instead of . The type of the value that will be stored in the parameter. Gets or sets the strongly-typed value of the parameter. Gets or sets the value of the parameter. This delegates to . Initializes a new instance of . Initializes a new instance of with a parameter name and value. Initializes a new instance of with a parameter name and type. Initializes a new instance of with a parameter name and type. Provides an API for a raw binary COPY operation, a high-performance data import/export mechanism to a PostgreSQL table. Initiated by See https://www.postgresql.org/docs/current/static/sql-copy.html. The copy binary format header signature Cancels and terminates an ongoing operation. Any data already written will be discarded. Cancels and terminates an ongoing operation. Any data already written will be discarded. Writer for a text import, initiated by . See https://www.postgresql.org/docs/current/static/sql-copy.html. Cancels and terminates an ongoing import. Any data already written will be discarded. Cancels and terminates an ongoing import. Any data already written will be discarded. Reader for a text export, initiated by . See https://www.postgresql.org/docs/current/static/sql-copy.html. Cancels and terminates an ongoing export. Asynchronously cancels and terminates an ongoing export. Provides the underlying mechanism for reading schema information. Returns the MetaDataCollections that lists all possible collections. The MetaDataCollections Returns the Restrictions that contains the meaning and position of the values in the restrictions array. The Restrictions Populates some generic type information that is common for base types, arrays, enums, etc. Some will be overridden later. Sets some custom, hardcoded info on a DataType row that cannot be loaded/inferred from PostgreSQL List of keywords taken from PostgreSQL 9.0 reserved words documentation. Options to configure Npgsql's support for OpenTelemetry tracing. Currently no options are available. Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. Specifies the object associated with the transaction. The object associated with the transaction. Specifies the object associated with the transaction. The object associated with the transaction. If true, the transaction has been committed/rolled back, but not disposed. Specifies the isolation level for this transaction. The isolation level for this transaction. The default is . Commits the database transaction. Commits the database transaction. An optional token to cancel the asynchronous operation. The default value is . Rolls back a transaction from a pending state. Rolls back a transaction from a pending state. An optional token to cancel the asynchronous operation. The default value is . Creates a transaction save point. The name of the savepoint. This method does not cause a database roundtrip to be made. The savepoint creation statement will instead be sent along with the next command. Creates a transaction save point. The name of the savepoint. An optional token to cancel the asynchronous operation. The default value is . This method does not cause a database roundtrip to be made, and will therefore always complete synchronously. The savepoint creation statement will instead be sent along with the next command. Rolls back a transaction from a pending savepoint state. The name of the savepoint. Rolls back a transaction from a pending savepoint state. The name of the savepoint. An optional token to cancel the asynchronous operation. The default value is . Releases a transaction from a pending savepoint state. The name of the savepoint. Releases a transaction from a pending savepoint state. The name of the savepoint. An optional token to cancel the asynchronous operation. The default value is . Disposes the transaction, rolling it back if it is still pending. Disposes the transaction, rolling it back if it is still pending. Disposes the transaction, without rolling back. Used only in special circumstances, e.g. when the connection is broken. Unbinds transaction from the connector. Should be called before the connector is returned to the pool. Represents a .pgpass file, which contains passwords for noninteractive connections File name being parsed for credentials Initializes a new instance of the class Parses file content and gets all credentials from the file corresponding to all lines in the .pgpass file Searches queries loaded from .PGPASS file to find first entry matching the provided parameters. Hostname to query. Use null to match any. Port to query. Use null to match any. Database to query. Use null to match any. User name to query. Use null to match any. Matching if match was found. Otherwise, returns null. Represents a hostname, port, database, username, and password combination that has been retrieved from a .pgpass file Hostname parsed from the .pgpass file Port parsed from the .pgpass file Database parsed from the .pgpass file User name parsed from the .pgpass file Password parsed from the .pgpass file This class represents an entry from the .pgpass file Hostname parsed from the .pgpass file Port parsed from the .pgpass file Database parsed from the .pgpass file User name parsed from the .pgpass file Password parsed from the .pgpass file Creates new based on string in the format hostname:port:database:username:password. The : and \ characters should be escaped with a \. string for the entry from the pgpass file New instance of for the string Entry is not formatted as hostname:port:database:username:password or non-wildcard port is not a number Checks whether this matches the parameters supplied Hostname to check against this entry Port to check against this entry Database to check against this entry Username to check against this entry True if the entry is a match. False otherwise. Checks if 2 strings are a match for a considering that either value can be a wildcard (*) Value being searched Value from the PGPASS entry True if the values are a match. False otherwise. Tracks all connectors currently managed by this pool, whether idle or busy. Only updated rarely - when physical connections are opened/closed - but is read in perf-sensitive contexts. Reader side for the idle connector channel. Contains nulls in order to release waiting attempts after a connector has been physically closed/broken. Incremented every time this pool is cleared via or . Allows us to identify connections which were created before the clear. Provides lookup for a pool based on a connection string. Note that pools created directly as are referenced directly by users, and aren't managed here. Resets the pool manager to its initial state, for test purposes only. Assumes that no other threads are accessing the pool. The default implementation of , for standard PostgreSQL databases.. The default implementation of NpgsqlDatabase, for standard PostgreSQL databases. The PostgreSQL types detected in the database. The PostgreSQL version string as returned by the version() function. Populated during loading. True if the backend is Amazon Redshift; otherwise, false. True if the 'pg_enum' table includes the 'enumsortorder' column; otherwise, false. True if the 'pg_type' table includes the 'typcategory' column; otherwise, false. pg_type.typcategory is added after 8.4. see: https://www.postgresql.org/docs/8.4/static/catalog-pg-type.html#CATALOG-TYPCATEGORY-TABLE Loads database information from the PostgreSQL database specified by . The database connection. The timeout while loading types from the backend. True to load types asynchronously. A task representing the asynchronous operation. Generates a raw SQL query string to select type information. Select all types (base, array which is also base, enum, range, composite). Note that arrays are distinguished from primitive types through them having typreceive=array_recv. Order by primitives first, container later. For arrays and ranges, join in the element OID and type (to filter out arrays of unhandled types). Loads type information from the backend specified by . The database connection. The timeout while loading types from the backend. True to load types asynchronously. A collection of types loaded from the backend. Unknown typtype for type '{internalName}' in pg_type: {typeChar}. Provides constants for PostgreSQL error codes. See https://www.postgresql.org/docs/current/static/errcodes-appendix.html The exception that is thrown when the PostgreSQL backend reports errors (e.g. query SQL issues, constraint violations). This exception only corresponds to a PostgreSQL-delivered error. Other errors (e.g. network issues) will be raised via , and purely Npgsql-related issues which aren't related to the server will be raised via the standard CLR exceptions (e.g. ). See https://www.postgresql.org/docs/current/static/errcodes-appendix.html, https://www.postgresql.org/docs/current/static/protocol-error-fields.html Creates a new instance. Creates a new instance. Populates a with the data needed to serialize the target object. The to populate with data. The destination (see ) for this serialization. Specifies whether the exception is considered transient, that is, whether retrying the operation could succeed (e.g. a network error). Check . Severity of the error or notice. Always present. Severity of the error or notice, not localized. Always present since PostgreSQL 9.6. The SQLSTATE code for the error. Always present. Constants are defined in . See https://www.postgresql.org/docs/current/static/errcodes-appendix.html The SQLSTATE code for the error. Always present. Constants are defined in . See https://www.postgresql.org/docs/current/static/errcodes-appendix.html The primary human-readable error message. This should be accurate but terse. Always present. An optional secondary error message carrying more detail about the problem. May run to multiple lines. An optional suggestion what to do about the problem. This is intended to differ from Detail in that it offers advice (potentially inappropriate) rather than hard facts. May run to multiple lines. The field value is a decimal ASCII integer, indicating an error cursor position as an index into the original query string. The first character has index 1, and positions are measured in characters not bytes. 0 means not provided. This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. The field will always appear when this field appears. 0 means not provided. The text of a failed internally-generated command. This could be, for example, a SQL query issued by a PL/pgSQL function. An indication of the context in which the error occurred. Presently this includes a call stack traceback of active PL functions. The trace is one entry per line, most recent first. If the error was associated with a specific database object, the name of the schema containing that object, if any. PostgreSQL 9.3 and up. Table name: if the error was associated with a specific table, the name of the table. (Refer to the schema name field for the name of the table's schema.) PostgreSQL 9.3 and up. If the error was associated with a specific table column, the name of the column. (Refer to the schema and table name fields to identify the table.) PostgreSQL 9.3 and up. If the error was associated with a specific data type, the name of the data type. (Refer to the schema name field for the name of the data type's schema.) PostgreSQL 9.3 and up. If the error was associated with a specific constraint, the name of the constraint. Refer to fields listed above for the associated table or domain. (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) PostgreSQL 9.3 and up. The file name of the source-code location where the error was reported. PostgreSQL 9.3 and up. The line number of the source-code location where the error was reported. The name of the source-code routine reporting the error. PostgreSQL notices are non-critical messages generated by PostgreSQL, either as a result of a user query (e.g. as a warning or informational notice), or due to outside activity (e.g. if the database administrator initiates a "fast" database shutdown). https://www.postgresql.org/docs/current/static/protocol-flow.html#PROTOCOL-ASYNC Severity of the error or notice. Always present. Severity of the error or notice, not localized. Always present since PostgreSQL 9.6. The SQLSTATE code for the error. Always present. See https://www.postgresql.org/docs/current/static/errcodes-appendix.html The SQLSTATE code for the error. Always present. See https://www.postgresql.org/docs/current/static/errcodes-appendix.html The primary human-readable error message. This should be accurate but terse. Always present. An optional secondary error message carrying more detail about the problem. May run to multiple lines. An optional suggestion what to do about the problem. This is intended to differ from Detail in that it offers advice (potentially inappropriate) rather than hard facts. May run to multiple lines. The field value is a decimal ASCII integer, indicating an error cursor position as an index into the original query string. The first character has index 1, and positions are measured in characters not bytes. 0 means not provided. This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. The field will always appear when this field appears. 0 means not provided. The text of a failed internally-generated command. This could be, for example, a SQL query issued by a PL/pgSQL function. An indication of the context in which the error occurred. Presently this includes a call stack traceback of active PL functions. The trace is one entry per line, most recent first. If the error was associated with a specific database object, the name of the schema containing that object, if any. PostgreSQL 9.3 and up. Table name: if the error was associated with a specific table, the name of the table. (Refer to the schema name field for the name of the table's schema.) PostgreSQL 9.3 and up. If the error was associated with a specific table column, the name of the column. (Refer to the schema and table name fields to identify the table.) PostgreSQL 9.3 and up. If the error was associated with a specific data type, the name of the data type. (Refer to the schema name field for the name of the data type's schema.) PostgreSQL 9.3 and up. If the error was associated with a specific constraint, the name of the constraint. Refer to fields listed above for the associated table or domain. (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) PostgreSQL 9.3 and up. The file name of the source-code location where the error was reported. PostgreSQL 9.3 and up. The line number of the source-code location where the error was reported. The name of the source-code routine reporting the error. Creates a new instance. Creates a new instance. Provides data for a PostgreSQL notice event. The Notice that was sent from the database. Represents a PostgreSQL array data type, which can hold several multiple values in a single column. See https://www.postgresql.org/docs/current/static/arrays.html. The PostgreSQL data type of the element contained within this array. Constructs a representation of a PostgreSQL array data type. Represents a PostgreSQL base data type, which is a simple scalar value. Represents a PostgreSQL composite data type, which can hold multiple fields of varying types in a single column. See https://www.postgresql.org/docs/current/static/rowtypes.html. Holds the name and types for all fields. Constructs a representation of a PostgreSQL array data type. Represents a field in a PostgreSQL composite data type. The name of the composite field. The type of the composite field. Represents a PostgreSQL domain type. 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. The PostgreSQL data type of the base type, i.e. the type this domain is based on. True if the domain has a NOT NULL constraint, otherwise false. Constructs a representation of a PostgreSQL domain data type. Represents a PostgreSQL enum data type. See https://www.postgresql.org/docs/current/static/datatype-enum.html. The enum's fields. Constructs a representation of a PostgreSQL enum data type. Represents a PostgreSQL multirange data type.

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

Multirange types were introduced in PostgreSQL 14.

The PostgreSQL data type of the range of this multirange. Constructs a representation of a PostgreSQL range data type. Represents a PostgreSQL range data type. See https://www.postgresql.org/docs/current/static/rangetypes.html. The PostgreSQL data type of the subtype of this range. The PostgreSQL data type of the multirange of this range. Constructs a representation of a PostgreSQL range data type. 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. 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. Constructs a representation of a PostgreSQL data type. The data type's namespace (or schema). The data type's name. The data type's OID. Constructs a representation of a PostgreSQL data type. The data type's namespace (or schema). The data type's name. The data type's internal name (e.g. _int4 for integer[]). The data type's OID. The data type's OID - a unique id identifying the data type in a given database (in pg_type). The data type's namespace (or schema). The data type's name. 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 for the latter. The full name of the backend type, including its namespace. A display name for this backend type, including the namespace unless it is pg_catalog (the namespace for all built-in types). The data type's internal PostgreSQL name (e.g. _int4 not integer[]). See for a more user-friendly name. If a PostgreSQL array type exists for this type, it will be referenced here. Otherwise null. If a PostgreSQL range type exists for this type, it will be referenced here. Otherwise null. Generates the type name including any facts (size, precision, scale), given the PostgreSQL type modifier. Returns a string that represents the current object. Represents a PostgreSQL data type that isn't known to Npgsql and cannot be handled. Constructs a the unknown backend type. Internally represents a statement has been prepared, is in the process of being prepared, or is a candidate for preparation (i.e. awaiting further usages). If true, the user explicitly requested this statement be prepared. It does not get closed as part of the automatic preparation LRU mechanism. If this statement is about to be prepared, but replaces a previous statement which needs to be closed, this holds the name of the previous statement. Otherwise null. Contains the handler types for a prepared statement's parameters, for overloaded cases (same SQL, different param types) Only populated after the statement has been prepared (i.e. null for candidates). The state of a . The statement hasn't been prepared yet, nor is it in the process of being prepared. This is the value for autoprepare candidates which haven't been prepared yet, and is also a temporary state during preparation. The statement is in the process of being prepared. The statement has been fully prepared and can be executed. The statement is in the process of being unprepared. This is a temporary state that only occurs during unprepare. Specifically, it means that a Close message for the statement has already been written to the write buffer. The statement has been unprepared and is no longer usable. The statement was invalidated because e.g. table schema has changed since preparation. Total number of current prepared statements (whether explicit or automatic). This API is for internal use and for implementing logical replication plugins. It is not meant to be consumed in common Npgsql usage scenarios. This API is for internal use and for implementing logical replication plugins. It is not meant to be consumed in common Npgsql usage scenarios. Creates a new replication slot and returns information about the newly-created slot. The to use for creating the replication slot The name of the slot to create. Must be a valid replication slot name (see https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS-MANIPULATION). The name of the output plugin used for logical decoding (see https://www.postgresql.org/docs/current/logicaldecoding-output-plugin.html). if this replication slot shall be temporary one; otherwise . Temporary slots are not saved to disk and are automatically dropped on error or when the session has finished. A to specify what to do with the snapshot created during logical slot initialization. , which is also the default, will export the snapshot for use in other sessions. This option can't be used inside a transaction. will use the snapshot for the current transaction executing the command. This option must be used in a transaction, and must be the first command run in that transaction. Finally, will just use the snapshot for logical decoding as normal but won't do anything else with it. If , this logical replication slot supports decoding of two-phase transactions. With this option, two-phase commands like PREPARE TRANSACTION, COMMIT PREPARED and ROLLBACK PREPARED are decoded and transmitted. The transaction will be decoded and transmitted at PREPARE TRANSACTION time. The default is . An optional token to cancel the asynchronous operation. The default value is . A representing a class that can be used to initialize instances of subclasses. Instructs the server to start streaming the WAL for logical replication, starting at WAL location or at the slot's consistent point if isn't specified. The server can reply with an error, for example if the requested section of the WAL has already been recycled. The to use for starting replication The replication slot that will be updated as replication progresses so that the server knows which WAL segments are still needed by the standby. The token to monitor for stopping the replication. The WAL location to begin streaming at. The collection of options passed to the slot's logical decoding plugin. Whether the plugin will be bypassing and reading directly from the buffer. A representing an that can be used to stream WAL entries in form of instances. Contains information about a newly-created logical replication slot. Creates a new logical replication slot The logical decoding output plugin to the corresponding replication slot was created for. A struct with information to create the replication slot. The identifier of the snapshot exported by the command. The snapshot is valid until a new command is executed on this connection or the replication connection is closed. The name of the output plugin used by the newly-created logical replication slot. The WAL location at which the slot became consistent. This is the earliest location from which streaming can start on this replication slot. Represents a logical replication connection to a PostgreSQL server. Initializes a new instance of . Initializes a new instance of with the given connection string. The connection used to open the PostgreSQL database. Decides what to do with the snapshot created during logical slot initialization. Export the snapshot for use in other sessions. This is the default. This option can't be used inside a transaction. Use the snapshot for the current transaction executing the command. This option must be used in a transaction, and CREATE_REPLICATION_SLOT must be the first command run in that transaction. Just use the snapshot for logical decoding as normal but don't do anything else with it. Logical Replication Protocol begin message The final LSN of the transaction. Commit timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01). Logical Replication Protocol begin prepare message Logical Replication Protocol commit message Flags; currently unused. The LSN of the commit. The end LSN of the transaction. Commit timestamp of the transaction. Flags for the commit. No flags. Logical Replication Protocol commit prepared message Flags for the commit prepared; currently unused. The LSN of the commit prepared. The end LSN of the commit prepared transaction. Commit timestamp of the transaction. Flags for the commit prepared; currently unused. No flags. Logical Replication Protocol update message for tables with REPLICA IDENTITY set to DEFAULT. Columns representing the new row. Abstract base class for Logical Replication Protocol delete message types. The relation for this . ID of the relation corresponding to the ID in the relation message. Logical Replication Protocol delete message for tables with REPLICA IDENTITY REPLICA IDENTITY set to FULL. Columns representing the deleted row. Logical Replication Protocol update message for tables with REPLICA IDENTITY set to FULL. Columns representing the old row. Columns representing the new row. Logical Replication Protocol update message for tables with REPLICA IDENTITY set to USING INDEX. Columns representing the key. Columns representing the new row. Logical Replication Protocol insert message The relation for this . ID of the relation corresponding to the ID in the relation message. Columns representing the new row. Logical Replication Protocol delete message for tables with REPLICA IDENTITY set to DEFAULT or USING INDEX. Columns representing the key. Logical Replication Protocol logical decoding message Flags; Either 0 for no flags or 1 if the logical decoding message is transactional. The LSN of the logical decoding message. The prefix of the logical decoding message. The content of the logical decoding message. Logical Replication Protocol origin message The LSN of the commit on the origin server. Name of the origin. The base class of all Logical Replication Protocol Messages See https://www.postgresql.org/docs/current/protocol-logicalrep-message-formats.html for details about the protocol. Abstract base class for Logical Replication Protocol prepare and begin prepare message The user defined GID of the two-phase transaction. Logical Replication Protocol prepare message Flags for the prepare; currently unused. Flags for the prepare; currently unused. No flags. Abstract base class for the logical replication protocol begin prepare and prepare message The LSN of the prepare. The end LSN of the prepared transaction. Prepare timestamp of the transaction. Logical Replication Protocol relation message ID of the relation. Namespace (empty string for pg_catalog). Relation name. Replica identity setting for the relation (same as relreplident in pg_class): columns used to form “replica identity” for rows. Relation columns Represents a column in a Logical Replication Protocol relation message Flags for the column. Name of the column. ID of the column's data type. Type modifier of the column (atttypmod). Flags for the column. No flags. Marks the column as part of the key. Replica identity setting for the relation (same as relreplident in pg_class). See Default (primary key, if any). Nothing. All columns. Index with indisreplident set (same as nothing if the index used has been dropped) Represents a column in a Logical Replication Protocol relation message Flags for the column. Currently can be either 0 for no flags or 1 which marks the column as part of the key. Name of the column. ID of the column's data type. Type modifier of the column (atttypmod). Logical Replication Protocol rollback prepared message Flags for the rollback prepared; currently unused. The end LSN of the prepared transaction. The end LSN of the rollback prepared transaction. Prepare timestamp of the transaction. Rollback timestamp of the transaction. Flags for the rollback prepared; currently unused. No flags. Logical Replication Protocol stream abort message Xid of the subtransaction (will be same as xid of the transaction for top-level transactions). Logical Replication Protocol stream commit message Flags; currently unused (must be 0). The LSN of the commit. The end LSN of the transaction. Commit timestamp of the transaction. Logical Replication Protocol stream prepare message Flags for the prepare; currently unused. Flags for the prepare; currently unused. No flags. Logical Replication Protocol stream start message A value of 1 indicates this is the first stream segment for this XID, 0 for any other stream segment. Logical Replication Protocol stream stop message The common base class for all streaming replication messages that can be part of a streaming transaction (protocol V2) Xid of the transaction (only present for streamed transactions). The common base class for all replication messages that set the transaction xid of a transaction Xid of the transaction. Logical Replication Protocol truncate message Option flags for TRUNCATE The relations being truncated. Enum representing the additional options for the TRUNCATE command as flags No additional option was specified CASCADE was specified RESTART IDENTITY was specified Logical Replication Protocol type message ID of the data type. Namespace (empty string for pg_catalog). Name of the data type. Abstract base class for Logical Replication Protocol delete message types. The relation for this . ID of the relation corresponding to the ID in the relation message. Columns representing the new row. Options to be passed to the pgoutput plugin Creates a new instance of . The publication names to include into the stream The version of the logical streaming replication protocol Send values in binary representation Enable streaming of in-progress transactions Write logical decoding messages into the replication stream Enable streaming of prepared transactions Creates a new instance of . The publication names to include into the stream The version of the logical streaming replication protocol Send values in binary representation Enable streaming of in-progress transactions Write logical decoding messages into the replication stream Enable streaming of prepared transactions The version of the Logical Streaming Replication Protocol The publication names to stream Send values in binary representation This works in PostgreSQL versions 14+ Enable streaming of in-progress transactions This works as of logical streaming replication protocol version 2 (PostgreSQL 14+) Write logical decoding messages into the replication stream This works in PostgreSQL versions 14+ Enable streaming of prepared transactions This works in PostgreSQL versions 15+ Acts as a proxy for a logical replication slot initialized for for the logical streaming replication protocol (pgoutput logical decoding plugin). Creates a new instance. Create a instance with this constructor to wrap an existing PostgreSQL replication slot that has been initialized for the pgoutput logical decoding plugin. The name of the existing replication slot Creates a new instance. Create a instance with this constructor to wrap an existing PostgreSQL replication slot that has been initialized for the pgoutput logical decoding plugin. The representing the existing replication slot Creates a new instance. This constructor is intended to be consumed by plugins sitting on top of The from which the new instance should be initialized Represents a streaming tuple containing . The number of columns in the tuple. Represents a column value in a logical replication session. The length of the value in bytes. The kind of data transmitted for a tuple in a Logical Replication Protocol message. A stream that has been opened on a column. Gets a value that indicates whether the column contains nonexistent or missing values. true if the specified column is equivalent to ; otherwise false. Gets a value that indicates whether the column contains an unchanged TOASTed value (the actual value is not sent). Whether the specified column is an unchanged TOASTed value. Gets a representation of the PostgreSQL data type for the specified field. The returned representation can be used to access various information about the field. Gets the data type information for the specified field. This is be the PostgreSQL type name (e.g. double precision), not the .NET type (see for that). Gets the data type of the specified column. The data type of the specified column. Gets the value of the specified column as a type. The type of the value to be returned. An optional token to cancel the asynchronous operation. The default value is . Gets the value of the specified column as an instance of . An optional token to cancel the asynchronous operation. The default value is . Retrieves data as a . Retrieves data as a . The kind of data transmitted for a tuple in a Logical Replication Protocol message. Identifies the data as NULL value. Identifies unchanged TOASTed value (the actual value is not sent). Identifies the data as text formatted value. Identifies the data as binary value. Added in PG14 Extension methods to use with the pg_output logical decoding plugin. Creates a class that wraps a replication slot using the "pgoutput" logical decoding plugin and can be used to start streaming replication via the logical streaming replication protocol. See https://www.postgresql.org/docs/current/protocol-logical-replication.html and https://www.postgresql.org/docs/current/protocol-logicalrep-message-formats.html for more information. The to use for creating the replication slot The name of the slot to create. Must be a valid replication slot name (see https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS-MANIPULATION). if this replication slot shall be temporary one; otherwise . Temporary slots are not saved to disk and are automatically dropped on error or when the session has finished. A to specify what to do with the snapshot created during logical slot initialization. , which is also the default, will export the snapshot for use in other sessions. This option can't be used inside a transaction. will use the snapshot for the current transaction executing the command. This option must be used in a transaction, and must be the first command run in that transaction. Finally, will just use the snapshot for logical decoding as normal but won't do anything else with it. If , this logical replication slot supports decoding of two-phase transactions. With this option, two-phase commands like PREPARE TRANSACTION, COMMIT PREPARED and ROLLBACK PREPARED are decoded and transmitted. The transaction will be decoded and transmitted at PREPARE TRANSACTION time. The default is . An optional token to cancel the asynchronous operation. The default value is . A that wraps the newly-created replication slot. Instructs the server to start the Logical Streaming Replication Protocol (pgoutput logical decoding plugin), starting at WAL location or at the slot's consistent point if isn't specified. The server can reply with an error, for example if the requested section of the WAL has already been recycled. The to use for starting replication The replication slot that will be updated as replication progresses so that the server knows which WAL segments are still needed by the standby. The collection of options passed to the slot's logical decoding plugin. The token to monitor for stopping the replication. The WAL location to begin streaming at. A representing an that can be used to stream WAL entries in form of instances. Represents a physical replication connection to a PostgreSQL server. Initializes a new instance of . Initializes a new instance of with the given connection string. The connection used to open the PostgreSQL database. Creates a that wraps a PostgreSQL physical replication slot and can be used to start physical streaming replication The name of the slot to create. Must be a valid replication slot name (see Section 26.2.6.1). if this replication slot shall be a temporary one; otherwise . Temporary slots are not saved to disk and are automatically dropped on error or when the session has finished. If this is set to this physical replication slot reserves WAL immediately. Otherwise, WAL is only reserved upon connection from a streaming replication client. An optional token to cancel the asynchronous operation. The default value is . A representing a that represents the newly-created replication slot. Read some information associated to a replication slot. This command is currently only supported for physical replication slots. The name of the slot to read. Must be a valid replication slot name An optional token to cancel the asynchronous operation. The default value is . A representing a or if the replication slot does not exist. Instructs the server to start streaming the WAL for physical replication, starting at WAL location . The server can reply with an error, for example if the requested section of the WAL has already been recycled. If the client requests a timeline that's not the latest but is part of the history of the server, the server will stream all the WAL on that timeline starting from the requested start point up to the point where the server switched to another timeline. The replication slot that will be updated as replication progresses so that the server knows which WAL segments are still needed by the standby. The WAL location to begin streaming at. The token to be used for stopping the replication. Streaming starts on timeline tli. A representing an that can be used to stream WAL entries in form of instances. Instructs the server to start streaming the WAL for logical replication, starting at WAL location . The server can reply with an error, for example if the requested section of WAL has already been recycled. If the client requests a timeline that's not the latest but is part of the history of the server, the server will stream all the WAL on that timeline starting from the requested start point up to the point where the server switched to another timeline. The WAL location to begin streaming at. The token to be used for stopping the replication. Streaming starts on timeline tli. A representing an that can be used to stream WAL entries in form of instances. Instructs the server to start streaming the WAL for physical replication, starting at the WAL location and timeline id specified in . The server can reply with an error, for example if the requested section of the WAL has already been recycled. If the client requests a timeline that's not the latest but is part of the history of the server, the server will stream all the WAL on that timeline starting from the requested start point up to the point where the server switched to another timeline. The replication slot that will be updated as replication progresses so that the server knows which WAL segments are still needed by the standby. The must contain a valid to be used for this overload. The token to be used for stopping the replication. A representing an that can be used to stream WAL entries in form of instances. Wraps a replication slot that uses physical replication. Creates a new instance. Create a instance with this constructor to wrap an existing PostgreSQL replication slot that has been initialized for physical replication. The name of the existing replication slot The replication slot's restart_lsn The timeline ID associated to restart_lsn, following the current timeline history. The replication slot's restart_lsn. The timeline ID associated to restart_lsn, following the current timeline history. Defines the core behavior of replication connections and provides the base class for and . Gets or sets the string used to connect to a PostgreSQL database. See the manual for details. The connection string that includes the server name, the database name, and other parameters needed to establish the initial connection. The default value is an empty string. Since replication connections are a special kind of connection, , , and are always disabled no matter what you set them to in your connection string. The location of the last WAL byte + 1 received in the standby. The location of the last WAL byte + 1 flushed to disk in the standby. The location of the last WAL byte + 1 applied (e. g. written to disk) in the standby. Send replies at least this often. Timeout. disables automated replies. Time that receiver waits for communication from master. Timeout. disables the timeout. The version of the PostgreSQL server we're connected to.

This can only be called when the connection is open.

In case of a development or pre-release version this field will contain the version of the next version to be released from this branch.

The PostgreSQL server version as returned by the server_version option. This can only be called when the connection is open. Gets or sets the wait time before terminating the attempt to execute a command and generating an error. The time to wait for the command to execute. The default value is 30 seconds. The client encoding for the connection This can only be called when there is an active connection. Process id of backend server. This can only be called when there is an active connection. Opens a database replication connection with the property settings specified by the . An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous open operation. Closes the replication connection and performs tasks associated with freeing, releasing, or resetting its unmanaged resources asynchronously. A task that represents the asynchronous dispose operation. Requests the server to identify itself. An optional token to cancel the asynchronous operation. The default value is . A containing information about the system we are connected to. Requests the server to send the current setting of a run-time parameter. This is similar to the SQL command SHOW. The name of a run-time parameter. Available parameters are documented in https://www.postgresql.org/docs/current/runtime-config.html. An optional token to cancel the asynchronous operation. The default value is . The current setting of the run-time parameter specified in as . Requests the server to send over the timeline history file for timeline tli. The timeline for which the history file should be sent. An optional token to cancel the asynchronous operation. The default value is . The timeline history file for timeline tli Sets the current status of the replication as it is interpreted by the consuming client. The value supplied in will be sent to the server via and with the next status update. A status update which will happen upon server request, upon expiration of our upon an enforced status update via , whichever happens first. If you want the value you set here to be pushed to the server immediately (e. g. in synchronous replication scenarios), call after calling this method. This is a convenience method setting both and in one operation. You can use it if your application processes replication messages in a way that doesn't care about the difference between writing a message and flushing it to a permanent storage medium. The location of the last WAL byte + 1 applied (e. g. processed or written to disk) and flushed to disk in the standby. Sends a forced status update to PostgreSQL with the current WAL tracking information. The connection currently isn't streaming A Task representing the sending of the status update (and not any PostgreSQL response). Drops a replication slot, freeing any reserved server-side resources. If the slot is a logical slot that was created in a database other than the database the walsender is connected to, this command fails. The name of the slot to drop. causes the command to wait until the slot becomes inactive if it currently is active instead of the default behavior of raising an error. An optional token to cancel the asynchronous operation. The default value is . A task representing the asynchronous drop operation. The common base class for all streaming replication messages The starting point of the WAL data in this message. The current end of WAL on the server. The server's system clock at the time this message was transmitted, as microseconds since midnight on 2000-01-01. Since the client using Npgsql and the server may be located in different time zones, as of Npgsql 7.0 this value is no longer converted to local time but keeps its original value in UTC. You can check if you don't want to introduce behavior depending on Npgsql versions. Contains information about a newly-created replication slot. The name of the newly-created replication slot. Contains information about a replication slot. Creates a new instance. The name of the replication slot. The WAL location at which the slot became consistent. Creates a new instance. The name of the replication slot. The WAL location at which the slot became consistent. The name of the replication slot. The WAL location at which the slot became consistent. The identifier of the snapshot exported by the CREATE_REPLICATION_SLOT command. Contains server identification information returned from . The unique system identifier identifying the cluster. This can be used to check that the base backup used to initialize the standby came from the same cluster. Current timeline ID. Also useful to check that the standby is consistent with the master. Current WAL flush location. Useful to get a known location in the write-ahead log where streaming can start. Database connected to. Text representations of PostgreSQL WAL operations decoded by the "test_decoding" plugin. See https://www.postgresql.org/docs/current/test-decoding.html. Decoded text representation of the operation performed in this WAL entry Returns a clone of this message, which can be accessed after other replication messages have been retrieved. Options to be passed to the test_decoding plugin Creates a new instance of . Include the transaction number for BEGIN and COMMIT command output Include the timestamp for COMMIT command output Set the output mode to binary Skip output for transactions that didn't change the database Only output data that don't have the replication origin set Include output from table rewrites that were caused by DDL statements Enable streaming output Include the transaction number for BEGIN and COMMIT command output Include the timestamp for COMMIT command output Set the output mode to binary Skip output for transactions that didn't change the database Only output data that don't have the replication origin set Include output from table rewrites that were caused by DDL statements Enable streaming output Acts as a proxy for a logical replication slot initialized for for the test_decoding logical decoding plugin. Creates a new instance. Create a instance with this constructor to wrap an existing PostgreSQL replication slot that has been initialized for the test_decoding logical decoding plugin. The name of the existing replication slot Creates a new instance. Create a instance with this constructor to wrap an existing PostgreSQL replication slot that has been initialized for the test_decoding logical decoding plugin. The representing the existing replication slot Extension methods to use with the test_decoding logical decoding plugin. See https://www.postgresql.org/docs/current/test-decoding.html. Creates a class that wraps a replication slot using the test_decoding logical decoding plugin. See https://www.postgresql.org/docs/current/test-decoding.html for more information. The to use for creating the replication slot The name of the slot to create. Must be a valid replication slot name (see https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS-MANIPULATION). if this replication slot shall be temporary one; otherwise . Temporary slots are not saved to disk and are automatically dropped on error or when the session has finished. A to specify what to do with the snapshot created during logical slot initialization. , which is also the default, will export the snapshot for use in other sessions. This option can't be used inside a transaction. will use the snapshot for the current transaction executing the command. This option must be used in a transaction, and must be the first command run in that transaction. Finally, will just use the snapshot for logical decoding as normal but won't do anything else with it. If , this logical replication slot supports decoding of two-phase transactions. With this option, two-phase commands like PREPARE TRANSACTION, COMMIT PREPARED and ROLLBACK PREPARED are decoded and transmitted. The transaction will be decoded and transmitted at PREPARE TRANSACTION time. The default is . An optional token to cancel the asynchronous operation. The default value is . A that wraps the newly-created replication slot. Instructs the server to start streaming the WAL for logical replication using the test_decoding logical decoding plugin, starting at WAL location or at the slot's consistent point if isn't specified. The server can reply with an error, for example if the requested section of the WAL has already been recycled. The to use for starting replication The replication slot that will be updated as replication progresses so that the server knows which WAL segments are still needed by the standby. The token to monitor for stopping the replication. The collection of options passed to the slot's logical decoding plugin. The WAL location to begin streaming at. A representing an that can be used to stream WAL entries in form of instances. Represents a PostgreSQL timeline history file File name of the timeline history file, e.g., 00000002.history. Contents of the timeline history file. A message representing a section of the WAL data stream. A section of the WAL data stream that is raw WAL data in physical replication or decoded with the selected logical decoding plugin in logical replication. It is only valid until the next is requested from the stream. A single WAL record is never split across two XLogData messages. When a WAL record crosses a WAL page boundary, and is therefore already split using continuation records, it can be split at the page boundary. In other words, the first main WAL record and its continuation records can be sent in different XLogData messages. Stripped-down version of , mainly to support Amazon Redshift. Performs some post-setup configuration that's common to both table columns and non-columns. Provides schema information about a column. Note that this can correspond to a field returned in a query which isn't an actual table column See https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getschematable(v=vs.110).aspx for information on the meaning of the different fields. Initializes a new instance of the class. The describing the type of this column. The OID of the type of this column in the PostgreSQL pg_type catalog table. The OID of the PostgreSQL table of this column. The column's position within its table. Note that this is different from , which is the column's position within the resultset. The default SQL expression for this column. The value for this column's type.

Receives a user SQL query as passed in by the user in or , and rewrites it for PostgreSQL compatibility.

This includes doing rewriting named parameter placeholders to positional (@p => $1), and splitting the query up by semicolons (legacy batching, SELECT 1; SELECT 2).

The user-facing being executed. Whether PostgreSQL standards-conforming are used. A bool indicating whether parameters contains a list of preconfigured parameters or an empty list to be filled with derived parameters.

Receives a user SQL query as passed in by the user in or , and rewrites it for PostgreSQL compatibility.

This includes doing rewriting named parameter placeholders to positional (@p => $1), and splitting the query up by semicolons (legacy batching, SELECT 1; SELECT 2).

The user-facing being executed. Whether PostgreSQL standards-conforming are used. A bool indicating whether parameters contains a list of preconfigured parameters or an empty list to be filled with derived parameters.
Specifies server type preference. Any successful connection is acceptable. Session must accept read-write transactions by default (that is, the server must not be in hot standby mode and the default_transaction_read_only parameter must be off). Session must not accept read-write transactions by default (the converse). Server must not be in hot standby mode. Server must be in hot standby mode. First try to find a primary server, but if none of the listed hosts is a primary server, try again in mode. First try to find a standby server, but if none of the listed hosts is a standby server, try again in mode. Utility class to execute a potentially non-cancellable while allowing to timeout and/or cancel awaiting for it and at the same time prevent event if the original fails later. Executes a potentially non-cancellable while allowing to timeout and/or cancel awaiting for it. If the given task does not complete within , a is thrown. The executed may be left in an incomplete state after the that this method returns completes dues to timeout and/or cancellation request. The method guarantees that the abandoned, incomplete is not going to produce event if it fails later. Gets the for execution with a combined that attempts to cancel the in an event of the timeout or external cancellation request. The timeout after which the should be faulted with a if it hasn't otherwise completed. The to monitor for a cancellation request. The result . The representing the asynchronous wait. Executes a potentially non-cancellable while allowing to timeout and/or cancel awaiting for it. If the given task does not complete within , a is thrown. The executed may be left in an incomplete state after the that this method returns completes dues to timeout and/or cancellation request. The method guarantees that the abandoned, incomplete is not going to produce event if it fails later. Gets the for execution with a combined that attempts to cancel the in an event of the timeout or external cancellation request. The timeout after which the should be faulted with a if it hasn't otherwise completed. The to monitor for a cancellation request. The representing the asynchronous wait. A type mapper, managing how to read and write CLR values to PostgreSQL data types. The preferred way to manage type mappings is on . An alternative, but discouraged, method, is to manage them globally via ). The default name translator to convert CLR type names and member names. Defaults to . Maps a CLR enum to a PostgreSQL enum type. CLR enum labels are mapped by name to PostgreSQL enum labels. The translation strategy can be controlled by the parameter, which defaults to . You can also use the on your enum fields to manually specify a PostgreSQL enum label. If there is a discrepancy between the .NET and database labels while an enum is read or written, an exception will be raised. A PostgreSQL type name for the corresponding enum type in the database. If null, the name translator given in will be used. A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). Defaults to . The .NET enum type to be mapped Removes an existing enum mapping. A PostgreSQL type name for the corresponding enum type in the database. If null, the name translator given in will be used. A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). Defaults to . Maps a CLR type to a PostgreSQL composite type. CLR fields and properties by string to PostgreSQL names. The translation strategy can be controlled by the parameter, which defaults to . You can also use the on your members to manually specify a PostgreSQL name. If there is a discrepancy between the .NET type and database type while a composite is read or written, an exception will be raised. A PostgreSQL type name for the corresponding composite type in the database. If null, the name translator given in will be used. A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). Defaults to . The .NET type to be mapped Removes an existing composite mapping. A PostgreSQL type name for the corresponding composite type in the database. If null, the name translator given in will be used. A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). Defaults to Maps a CLR type to a composite type. Maps CLR fields and properties by string to PostgreSQL names. The translation strategy can be controlled by the parameter, which defaults to . If there is a discrepancy between the .NET type and database type while a composite is read or written, an exception will be raised. The .NET type to be mapped. A PostgreSQL type name for the corresponding composite type in the database. If null, the name translator given in will be used. A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). Defaults to . Removes an existing composite mapping. The .NET type to be unmapped. A PostgreSQL type name for the corresponding composite type in the database. If null, the name translator given in will be used. A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). Defaults to . Adds a type resolver factory, which produces resolvers that can add or modify support for PostgreSQL types. Typically used by plugins. The type resolver factory to be added. Resets all mapping changes performed on this type mapper and reverts it to its original, starting state. Holds well-known, built-in PostgreSQL type OIDs. Source: Looks up a type handler by its PostgreSQL type's OID. A PostgreSQL type OID A type handler that can be used to encode and decode values. Represents a timeout that will expire at some point. A wrapper around to simplify reset management. Since there's no way to reset a once it was cancelled, we need to make sure that an existing cancellation token source hasn't been cancelled, every time we start it (see https://github.com/dotnet/runtime/issues/4694). Used, so we wouldn't concurently use the cts for the cancellation, while it's being disposed Set the timeout on the wrapped and make sure that it hasn't been cancelled yet An optional token to cancel the asynchronous operation. The default value is . The from the wrapped Restart the timeout on the wrapped without reinitializing it, even if is already set to Reset the wrapper to contain a unstarted and uncancelled in order make sure the next call to will not invalidate the cancellation token. An optional token to cancel the asynchronous operation. The default value is . The from the wrapped Reset the wrapper to contain a unstarted and uncancelled in order make sure the next call to will not invalidate the cancellation token. Set the timeout on the wrapped to can still arrive at a state where it's value is if the passed to gets a cancellation request. If this is the case it will be resolved upon the next call to or . Calling multiple times or without calling first will do no any harm (besides eating a tiny amount of CPU cycles). Cancel the wrapped Cancel the wrapped after delay The from the wrapped . The token is only valid after calling and before calling the next time. Otherwise you may end up with a token that has already been cancelled or belongs to a cancellation token source that has been disposed. Allocation free helper function to find if version is greater than expected Note that a connection may be closed before its TransactionScope completes. In this case we close the NpgsqlConnection as usual but the connector in a special list in the pool; it will be closed only when the scope completes. Represents a PostgreSQL data type that can be written or read to the database. Used in places such as to unambiguously specify how to encode or decode values. See https://www.postgresql.org/docs/current/static/datatype.html. Corresponds to the PostgreSQL 8-byte "bigint" type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html Corresponds to the PostgreSQL 8-byte floating-point "double" type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html Corresponds to the PostgreSQL 4-byte "integer" type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html Corresponds to the PostgreSQL arbitrary-precision "numeric" type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html Corresponds to the PostgreSQL floating-point "real" type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html Corresponds to the PostgreSQL 2-byte "smallint" type. See https://www.postgresql.org/docs/current/static/datatype-numeric.html Corresponds to the PostgreSQL "money" type. See https://www.postgresql.org/docs/current/static/datatype-money.html Corresponds to the PostgreSQL "boolean" type. See https://www.postgresql.org/docs/current/static/datatype-boolean.html Corresponds to the PostgreSQL geometric "box" type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Corresponds to the PostgreSQL geometric "circle" type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Corresponds to the PostgreSQL geometric "line" type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Corresponds to the PostgreSQL geometric "lseg" type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Corresponds to the PostgreSQL geometric "path" type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Corresponds to the PostgreSQL geometric "point" type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Corresponds to the PostgreSQL geometric "polygon" type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Corresponds to the PostgreSQL "char(n)" type. See https://www.postgresql.org/docs/current/static/datatype-character.html Corresponds to the PostgreSQL "text" type. See https://www.postgresql.org/docs/current/static/datatype-character.html Corresponds to the PostgreSQL "varchar" type. See https://www.postgresql.org/docs/current/static/datatype-character.html Corresponds to the PostgreSQL internal "name" type. See https://www.postgresql.org/docs/current/static/datatype-character.html Corresponds to the PostgreSQL "citext" type for the citext module. See https://www.postgresql.org/docs/current/static/citext.html Corresponds to the PostgreSQL "char" type. This is an internal field and should normally not be used for regular applications. See https://www.postgresql.org/docs/current/static/datatype-text.html Corresponds to the PostgreSQL "bytea" type, holding a raw byte string. See https://www.postgresql.org/docs/current/static/datatype-binary.html Corresponds to the PostgreSQL "date" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "time" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "timestamp" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "timestamp with time zone" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "timestamp with time zone" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "interval" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "time with time zone" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "time with time zone" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the obsolete PostgreSQL "abstime" type. See https://www.postgresql.org/docs/current/static/datatype-datetime.html Corresponds to the PostgreSQL "inet" type. See https://www.postgresql.org/docs/current/static/datatype-net-types.html Corresponds to the PostgreSQL "cidr" type, a field storing an IPv4 or IPv6 network. See https://www.postgresql.org/docs/current/static/datatype-net-types.html Corresponds to the PostgreSQL "macaddr" type, a field storing a 6-byte physical address. See https://www.postgresql.org/docs/current/static/datatype-net-types.html Corresponds to the PostgreSQL "macaddr8" type, a field storing a 6-byte or 8-byte physical address. See https://www.postgresql.org/docs/current/static/datatype-net-types.html Corresponds to the PostgreSQL "bit" type. See https://www.postgresql.org/docs/current/static/datatype-bit.html Corresponds to the PostgreSQL "varbit" type, a field storing a variable-length string of bits. See https://www.postgresql.org/docs/current/static/datatype-boolean.html Corresponds to the PostgreSQL "tsvector" type. See https://www.postgresql.org/docs/current/static/datatype-textsearch.html Corresponds to the PostgreSQL "tsquery" type. See https://www.postgresql.org/docs/current/static/datatype-textsearch.html Corresponds to the PostgreSQL "regconfig" type. See https://www.postgresql.org/docs/current/static/datatype-textsearch.html Corresponds to the PostgreSQL "uuid" type. See https://www.postgresql.org/docs/current/static/datatype-uuid.html Corresponds to the PostgreSQL "xml" type. See https://www.postgresql.org/docs/current/static/datatype-xml.html Corresponds to the PostgreSQL "json" type, a field storing JSON in text format. See https://www.postgresql.org/docs/current/static/datatype-json.html Corresponds to the PostgreSQL "jsonb" type, a field storing JSON in an optimized binary. format. Supported since PostgreSQL 9.4. See https://www.postgresql.org/docs/current/static/datatype-json.html Corresponds to the PostgreSQL "jsonpath" type, a field storing JSON path in text format. format. Supported since PostgreSQL 12. See https://www.postgresql.org/docs/current/datatype-json.html#DATATYPE-JSONPATH Corresponds to the PostgreSQL "hstore" type, a dictionary of string key-value pairs. See https://www.postgresql.org/docs/current/static/hstore.html Corresponds to the PostgreSQL "refcursor" type. Corresponds to the PostgreSQL internal "oidvector" type. See https://www.postgresql.org/docs/current/static/datatype-oid.html Corresponds to the PostgreSQL internal "int2vector" type. Corresponds to the PostgreSQL "oid" type. See https://www.postgresql.org/docs/current/static/datatype-oid.html Corresponds to the PostgreSQL "xid" type, an internal transaction identifier. See https://www.postgresql.org/docs/current/static/datatype-oid.html Corresponds to the PostgreSQL "xid8" type, an internal transaction identifier. See https://www.postgresql.org/docs/current/static/datatype-oid.html Corresponds to the PostgreSQL "cid" type, an internal command identifier. See https://www.postgresql.org/docs/current/static/datatype-oid.html Corresponds to the PostgreSQL "regtype" type, a numeric (OID) ID of a type in the pg_type table. Corresponds to the PostgreSQL "tid" type, a tuple id identifying the physical location of a row within its table. 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. See: https://www.postgresql.org/docs/current/datatype-pg-lsn.html and https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=7d03a83f4d0736ba869fa6f93973f7623a27038a 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. This value shouldn't ordinarily be used, and makes sense only when sending a data type unsupported by Npgsql. The geometry type for PostgreSQL spatial extension PostGIS. The geography (geodetic) type for PostgreSQL spatial extension PostGIS. The PostgreSQL ltree type, each value is a label path "a.label.tree.value", forming a tree in a set. See https://www.postgresql.org/docs/current/static/ltree.html The PostgreSQL lquery type for PostgreSQL extension ltree See https://www.postgresql.org/docs/current/static/ltree.html The PostgreSQL ltxtquery type for PostgreSQL extension ltree See https://www.postgresql.org/docs/current/static/ltree.html Corresponds to the PostgreSQL "int4range" type. Corresponds to the PostgreSQL "int8range" type. Corresponds to the PostgreSQL "numrange" type. Corresponds to the PostgreSQL "tsrange" type. Corresponds to the PostgreSQL "tstzrange" type. Corresponds to the PostgreSQL "daterange" type. Corresponds to the PostgreSQL "int4multirange" type. Corresponds to the PostgreSQL "int8multirange" type. Corresponds to the PostgreSQL "nummultirange" type. Corresponds to the PostgreSQL "tsmultirange" type. Corresponds to the PostgreSQL "tstzmultirange" type. Corresponds to the PostgreSQL "datemultirange" type. Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of another type. This value must be combined with another value from via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) See https://www.postgresql.org/docs/current/static/arrays.html Corresponds to the PostgreSQL "range" type, continuous range of values of specific type. This value must be combined with another value from via a bit OR (e.g. NpgsqlDbType.Range | NpgsqlDbType.Integer) Supported since PostgreSQL 9.2. See https://www.postgresql.org/docs/current/static/rangetypes.html Corresponds to the PostgreSQL "multirange" type, continuous range of values of specific type. This value must be combined with another value from via a bit OR (e.g. NpgsqlDbType.Multirange | NpgsqlDbType.Integer) Supported since PostgreSQL 14. See https://www.postgresql.org/docs/current/static/rangetypes.html Represents a built-in PostgreSQL type as it appears in pg_type, including its name and OID. Extension types with variable OIDs are not represented. A raw representation of the PostgreSQL interval datatype. Use only when or NodaTime Period do not have sufficient range to handle your values.

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

Do not use this type unless you have to: prefer or NodaTime Period when possible.

Constructs an . Months and years, after time for alignment. Days, after time for alignment. Remaining time unit smaller than a day, in microseconds. Wraps a PostgreSQL Write-Ahead Log Sequence Number (see: https://www.postgresql.org/docs/current/datatype-pg-lsn.html) Log Sequence Numbers are a fundamental concept of the PostgreSQL Write-Ahead Log and by that of PostgreSQL replication. See https://www.postgresql.org/docs/current/wal-internals.html for what they represent. This struct provides conversions from/to and and beyond that tries to port the methods and operators in https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/adt/pg_lsn.c but nothing more. Zero is used indicate an invalid Log Sequence Number. No XLOG record can begin at zero. Initializes a new instance of . The value to wrap. Returns a value indicating whether this instance is equal to a specified instance. A instance to compare to this instance. if the current instance is equal to the value parameter; otherwise, . Compares this instance to a specified and returns an indication of their relative values. A instance to compare to this instance. A signed number indicating the relative values of this instance and . Returns a value indicating whether this instance is equal to a specified object. An object to compare to this instance if the current instance is equal to the value parameter; otherwise, . Returns the hash code for this instance. A 32-bit signed integer hash code. Converts the numeric value of this instance to its equivalent string representation. The string representation of the value of this instance, consisting of two hexadecimal numbers of up to 8 digits each, separated by a slash Converts the string representation of a Log Sequence Number to a instance. A string that represents the Log Sequence Number to convert. A equivalent to the Log Sequence Number specified in . The parameter is . The parameter represents a number less than or greater than . The parameter is not in the right format. Converts the span representation of a Log Sequence Number to a instance. A span containing the characters that represent the Log Sequence Number to convert. A equivalent to the Log Sequence Number specified in . The parameter represents a number less than or greater than . The parameter is not in the right format. Tries to convert the string representation of a Log Sequence Number to an instance. A return value indicates whether the conversion succeeded or failed. A string that represents the Log Sequence Number to convert. When this method returns, contains a instance equivalent to the Log Sequence Number contained in , if the conversion succeeded, or the default value for (0) if the conversion failed. The conversion fails if the parameter is or , is not in the right format, or represents a number less than or greater than . This parameter is passed uninitialized; any value originally supplied in result will be overwritten. if c> was converted successfully; otherwise, . Tries to convert the span representation of a Log Sequence Number to an instance. A return value indicates whether the conversion succeeded or failed. A span containing the characters that represent the Log Sequence Number to convert. When this method returns, contains a instance equivalent to the Log Sequence Number contained in , if the conversion succeeded, or the default value for (0) if the conversion failed. The conversion fails if the parameter is empty, is not in the right format, or represents a number less than or greater than . This parameter is passed uninitialized; any value originally supplied in result will be overwritten. if was converted successfully; otherwise, . Converts the value of a 64-bit unsigned integer to a instance. A 64-bit unsigned integer. A new instance of initialized to . Converts the value of a instance to a 64-bit unsigned integer value. A instance The contents of as 64-bit unsigned integer. Returns a value that indicates whether two specified instances of are equal. The first Log Sequence Number to compare. The second Log Sequence Number to compare. if equals ; otherwise, . Returns a value that indicates whether two specified instances of are not equal. The first Log Sequence Number to compare. The second Log Sequence Number to compare. if does not equal ; otherwise, . Returns a value indicating whether a specified instance is greater than another specified instance. The first value to compare. The second value to compare. if is greater than ; otherwise, . Returns a value indicating whether a specified instance is less than another specified instance. The first value to compare. The second value to compare. if is less than ; otherwise, . Returns a value indicating whether a specified instance is greater than or equal to another specified instance. The first value to compare. The second value to compare. if is greater than or equal to ; otherwise, . Returns the larger of two values. The first value to compare. The second value to compare. The larger of the two values. Returns the smaller of two values. The first value to compare. The second value to compare. The smaller of the two values. Returns a value indicating whether a specified instance is less than or equal to another specified instance. The first value to compare. The second value to compare. if is less than or equal to ; otherwise, . Subtracts two specified values. The first value. The second value. The number of bytes separating those write-ahead log locations. Subtract the number of bytes from a instance, giving a new instance. Handles both positive and negative numbers of bytes. The instance representing a write-ahead log location. The number of bytes to subtract. A new instance. The resulting instance would represent a number less than . Add the number of bytes to a instance, giving a new instance. Handles both positive and negative numbers of bytes. The instance representing a write-ahead log location. The number of bytes to add. A new instance. The resulting instance would represent a number greater than . Represents a PostgreSQL range type. The element type of the values in the range. See: https://www.postgresql.org/docs/current/static/rangetypes.html Defined by PostgreSQL to represent an empty range. Defined by PostgreSQL to represent an infinite lower bound. Some element types may have specific handling for this value distinct from a missing or null value. Defined by PostgreSQL to represent an infinite upper bound. Some element types may have specific handling for this value distinct from a missing or null value. Defined by PostgreSQL to represent an null bound. Some element types may have specific handling for this value distinct from an infinite or missing value. Defined by PostgreSQL to represent a lower inclusive bound. Defined by PostgreSQL to represent a lower exclusive bound. Defined by PostgreSQL to represent an upper inclusive bound. Defined by PostgreSQL to represent an upper exclusive bound. Defined by PostgreSQL to separate the values for the upper and lower bounds. The used by to convert bounds into . True if implements ; otherwise, false. Represents the empty range. This field is read-only. The lower bound of the range. Only valid when is false. The upper bound of the range. Only valid when is false. The characteristics of the boundaries. True if the lower bound is part of the range (i.e. inclusive); otherwise, false. True if the upper bound is part of the range (i.e. inclusive); otherwise, false. True if the lower bound is indefinite (i.e. infinite or unbounded); otherwise, false. True if the upper bound is indefinite (i.e. infinite or unbounded); otherwise, false. True if the range is empty; otherwise, false. Constructs an with inclusive and definite bounds. The lower bound of the range. The upper bound of the range. Constructs an with definite bounds. The lower bound of the range. True if the lower bound is is part of the range (i.e. inclusive); otherwise, false. The upper bound of the range. True if the upper bound is part of the range (i.e. inclusive); otherwise, false. Constructs an . The lower bound of the range. True if the lower bound is is part of the range (i.e. inclusive); otherwise, false. True if the lower bound is indefinite (i.e. infinite or unbounded); otherwise, false. The upper bound of the range. True if the upper bound is part of the range (i.e. inclusive); otherwise, false. True if the upper bound is indefinite (i.e. infinite or unbounded); otherwise, false. Constructs an . The lower bound of the range. The upper bound of the range. The characteristics of the range boundaries. Attempts to determine if the range is malformed or implicitly empty. The lower bound of the range. The upper bound of the range. The characteristics of the range boundaries. True if the range is implicitly empty; otherwise, false. Evaluates the boundary flags. True if the lower bound is is part of the range (i.e. inclusive); otherwise, false. True if the lower bound is indefinite (i.e. infinite or unbounded); otherwise, false. True if the upper bound is part of the range (i.e. inclusive); otherwise, false. True if the upper bound is indefinite (i.e. infinite or unbounded); otherwise, false. The boundary characteristics. Indicates whether the on the left is equal to the on the right. The on the left. The on the right. True if the on the left is equal to the on the right; otherwise, false. Indicates whether the on the left is not equal to the on the right. The on the left. The on the right. True if the on the left is not equal to the on the right; otherwise, false. Parses the well-known text representation of a PostgreSQL range type into a . A PosgreSQL range type in a well-known text format. The represented by the . Malformed range literal. Malformed range literal. Missing left parenthesis or bracket. Malformed range literal. Missing right parenthesis or bracket. Malformed range literal. Missing comma after lower bound. See: https://www.postgresql.org/docs/current/static/rangetypes.html Represents a type converter for . Adds a to the closed form . Represents characteristics of range type boundaries. See: https://www.postgresql.org/docs/current/static/rangetypes.html The default flag. The range is not empty and has boundaries that are definite and exclusive. The range is empty. E.g. '(0,0)', 'empty'. The lower bound is inclusive. E.g. '[0,5]', '[0,5)', '[0,)'. The upper bound is inclusive. E.g. '[0,5]', '(0,5]', '(,5]'. The lower bound is infinite or indefinite. E.g. '(null,5]', '(-infinity,5]', '(,5]'. The upper bound is infinite or indefinite. E.g. '[0,null)', '[0,infinity)', '[0,)'. Both the lower and upper bounds are inclusive. Both the lower and upper bounds are indefinite. The lower bound is both inclusive and indefinite. This represents an error condition. The upper bound is both inclusive and indefinite. This represents an error condition. Represents a PostgreSQL tsquery. This is the base class for the lexeme, not, or, and, and "followed by" nodes. Node kind NodeKind Represents the empty tsquery. Should only be used at top level. Lexeme Not operator And operator Or operator "Followed by" operator Constructs an . Writes the tsquery in PostgreSQL's text format. Writes the tsquery in PostgreSQL's text format. Parses a tsquery in PostgreSQL's text format. Returns a value indicating whether this instance and a specified object represent the same value. An object to compare to this instance. if g is equal to this instance; otherwise, . Indicates whether the values of two specified objects are equal. The first object to compare. The second object to compare. if and are equal; otherwise, . Indicates whether the values of two specified objects are not equal. The first object to compare. The second object to compare. if and are not equal; otherwise, . TsQuery Lexeme node. Lexeme text. Weights is a bitmask of the Weight enum. Prefix search. Creates a tsquery lexeme with only lexeme text. Lexeme text. Creates a tsquery lexeme with lexeme text and weights. Lexeme text. Bitmask of enum Weight. Creates a tsquery lexeme with lexeme text, weights and prefix search flag. Lexeme text. Bitmask of enum Weight. Is prefix search? Weight enum, can be OR'ed together. None D C B A TsQuery Not node. Child node Creates a not operator, with a given child node. Base class for TsQuery binary operators (& and |). Left child Right child Constructs a . TsQuery And node. Creates an and operator, with two given child nodes. TsQuery Or Node. Creates an or operator, with two given child nodes. TsQuery "Followed by" Node. The distance between the 2 nodes, in lexemes. Creates a "followed by" operator, specifying 2 child nodes and the distance between them in lexemes. Represents an empty tsquery. Shold only be used as top node. Creates a tsquery that represents an empty query. Should not be used as child node. Represents a PostgreSQL tsvector. Parses a tsvector in PostgreSQL's text format. Returns the lexeme at a specific index Gets the number of lexemes. Returns an enumerator. Returns an enumerator. Gets a string representation in PostgreSQL's format. Represents a lexeme. A lexeme consists of a text string and optional word entry positions. Gets or sets the text. Creates a lexeme with no word entry positions. Creates a lexeme with word entry positions. Gets a word entry position. Gets the number of word entry positions. Creates a string representation in PostgreSQL's format. Represents a word entry position and an optional weight. Creates a WordEntryPos with a given position and weight. Position values can range from 1 to 16383; larger numbers are silently set to 16383. A weight labeled between A and D. The weight is labeled from A to D. D is the default, and not printed. The position is a 14-bit unsigned integer indicating the position in the text this lexeme occurs. Cannot be 0. Prints this lexeme in PostgreSQL's format, i.e. position is followed by weight (weight is only printed if A, B or C). Determines whether the specified object is equal to the current object. Determines whether the specified object is equal to the current object. Gets a hash code for the current object. Determines whether the specified object is equal to the current object. Determines whether the specified object is unequal to the current object. The weight is labeled from A to D. D is the default, and not printed. D, the default C B A Determines whether the specified object is equal to the current object. Determines whether the specified object is equal to the current object. Gets a hash code for the current object. Determines whether the specified object is equal to the current object. Determines whether the specified object is unequal to the current object. Represents a PostgreSQL point type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Represents a PostgreSQL line type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Represents a PostgreSQL Line Segment type. Represents a PostgreSQL box type. See https://www.postgresql.org/docs/current/static/datatype-geometric.html Represents a PostgreSQL Path type. Represents a PostgreSQL Polygon type. Represents a PostgreSQL Circle type. Represents a PostgreSQL inet type, which is a combination of an IPAddress and a subnet mask. https://www.postgresql.org/docs/current/static/datatype-net-types.html Represents a PostgreSQL tid value https://www.postgresql.org/docs/current/static/datatype-oid.html Block number Tuple index within block Indicates that this property or field corresponds to a PostgreSQL field with the specified name The name of PostgreSQL field that corresponds to this CLR property or field Indicates that this property or field corresponds to a PostgreSQL field with the specified name The name of PostgreSQL field that corresponds to this CLR property or field