Npgsql Api Docs |

# NpgsqlConnection Properties

The properties of the NpgsqlConnection class are listed below. For a complete list of NpgsqlConnection class members, see the NpgsqlConnection Members topic.

#### Public Instance Properties

BackendProtocolVersion | Protocol version in use. This can only be called when there is an active connection.
CommandTimeout | Gets the time to wait while trying to execute a command before terminating the attempt and generating an error.
ConnectionLifeTime | Gets the time to wait before closing unused connections in the pool if the count of all connections exeeds MinPoolSize.
ConnectionString | Gets or sets the string used to connect to a PostgreSQL database. Valid values are: Server: Address/Name of Postgresql Server; Port: Port to connect to; Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; Database: Database name. Defaults to user name if not specified; User Id: User name; Password: Password for clear text authentication; SSL: True or False. Controls whether to attempt a secure connection. Default = False; Pooling: True or False. Controls whether connection pooling is used. Default = True; MinPoolSize: Min size of connection pool; MaxPoolSize: Max size of connection pool; Timeout: Time to wait for connection open in seconds. Default is 15. CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. SyncNotification: Specifies if Npgsql should use synchronous notifications. SearchPath: Changes search path to specified and public schemas.
ConnectionTimeout | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Container |
Database | Gets the name of the current database or the database to be used after a connection is opened.
DataSource | Gets the database server name.
FullState | Gets the current state of the connection.
Host | Backend server host name.
NpgsqlCompatibilityVersion |
Port | Backend server port.
PostgreSqlVersion | Version of the PostgreSQL backend. This can only be called when there is an active connection.
PreloadReader | Whether datareaders are loaded in their entirety (for compatibility with earlier code).
ProcessID | Process id of backend server. This can only be called when there is an active connection.
ServerVersion |
Site |
SSL | If true, the connection will attempt to use SSL.
State | Gets whether the current state of the connection is Open or Closed
SyncNotification | Gets flag indicating if we are using Synchronous notification or not. The default value is false.
UseExtendedTypes |

#### See Also

NpgsqlConnection Class | Npgsql Namespace