Your Collection
Your collection items will appear here.

Odbc Postgres Here

[MyPostgresDB] Driver = PostgreSQL Unicode Server = localhost Port = 5432 Database = mydb Username = myuser Password = mypass SSLmode = require Also check /etc/odbcinst.ini (driver definition):

DSN=MyPostgresDB;UID=myuser;PWD=mypass;

SELECT version(); import pyodbc conn_str = ( "DRIVER=PostgreSQL Unicode;" "SERVER=localhost;" "PORT=5432;" "DATABASE=mydb;" "UID=myuser;" "PWD=mypass;" ) conn = pyodbc.connect(conn_str) cursor = conn.cursor() cursor.execute("SELECT 1") print(cursor.fetchone()) 5. Common Connection String Formats Generic ODBC: odbc postgres

DRIVER=PostgreSQL Unicode;SERVER=localhost;DATABASE=mydb;UID=myuser;PWD=mypass;PORT=5432; odbc postgres