
+---------------------------------------+ | Connected! | | sql-statement | | help [tablename] | | quit | +---------------------------------------+ SQL> | Driver Version | PostgreSQL Versions | ODBC Standard | |----------------|---------------------|---------------| | 9.x | 8.4 - 11 | 3.5 | | 10.x | 9.x - 13 | 3.5 | | 11.x | 10 - 14 | 3.5 | | 12.x | 11 - 15+ | 3.5 | | 13.x | 12 - 16+ | 3.5 |
[PostgreSQL] Description = PostgreSQL ODBC driver Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so Driver64 = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so Setup64 = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so Using Homebrew: odbc postgres driver
Driver=PostgreSQL Unicode;Server=192.168.1.10;Database=secure_db;Uid=app_user;Pwd=securepass;SSLmode=require;SSLrootcert=cacert.pem; +---------------------------------------+ | Connected
for row in rows: print(f"ID: row.id, Name: row.name") for row in rows: print(f"ID: row.id
[MyPostgresDB] Driver = PostgreSQL Description = PostgreSQL Test Database Server = localhost Port = 5432 Database = sales_db UserName = postgres Password = secret Protocol = 7.4 UseServerSidePrepare = 1 Applications can connect using direct connection strings, which is often more portable than DSNs. Basic Connection String Driver=PostgreSQL Unicode;Server=localhost;Port=5432;Database=mydb;Uid=postgres;Pwd=secret; Advanced Examples Windows authentication (SSPI):