Connection strings for Postgre SQL
.NET libraries for Postgre SQL
- dotConnect for PostgreSQL (former Core Labs PostgreSQLDirect) - PgSqlConnection
- Npgsql - NpgsqlConnection
- .NET Framework Data Provider for OLE DB - OleDbConnection
- .NET Framework Data Provider for ODBC - OdbcConnection
OLE DB providers for Postgre SQL
ODBC drivers for Postgre SQL
dotConnect for PostgreSQL (former Core Labs PostgreSQLDirect)
Usage Devart.Data.PostgreSql.PgSqlConnection
Manufacturer Devart
Standard
Npgsql
Usage Npgsql.NpgsqlConnection
Manufacturer Npgsql Development Team
Standard
Using windows security
Setting command timeout
The CommandTimeout parameter is measured in seconds and controls for how long to wait for a command to finish before throwing an error.
Setting connection timeout
The Timeout parameter is measured in seconds and controls for how long to wait for a connection to open before throwing an error.
Specifying protocol version
Valid values for the key Protocol is 2 or 3.
SSL activated
Without SSL
Controlling pooling mechanisms
PostgreSQL OLE DB Provider
Usage Provider=PostgreSQL OLE DB Provider
Manufacturer PgOleDb Development Team
Standard
PgOleDb requires a PQLib of version 7.4 or up and it also requires a backend of version 7.4 or up. Timestamps are only guarenteed to work with backends of version 8.0 and up.
Other valid Provider values is "PostgreSQL" and "PostgreSQL.1"
Standard alternative
Some reported problems with the above one. Try removing the timeout parameter to make it work.
.NET Framework Data Provider for OLE DB
Usage System.Data.OleDb.OleDbConnection
Manufacturer Microsoft
Use an OLE DB provider from .NET
See the respective OLEDB provider's connection strings options. The .net OleDbConnection will just pass on the connection string to the specified OLEDB provider. Read more here.
PostgreSQL ODBC Driver (psqlODBC)
Usage Driver={PostgreSQL}
Manufacturer PostgreSQL
Standard
ANSI
Unicode
SSL
Secure sockets layer for this driver only works from version 8.0 and above.
Please note that sslmode=require is case sensitive, it should be written in lower case letters.
.NET Framework Data Provider for ODBC
Usage System.Data.Odbc.OdbcConnection
Manufacturer Microsoft
Use an ODBC driver from .NET
See the respective ODBC driver's connection strings options. The .net OdbcConnection will just pass on the connection string to the specified ODBC driver. Read more here.