PostgreSQL for Windows

PostgreSQL ODBC Driver (psqlODBC) for Windows — x64 and x86

Pick the right architecture for your client app, install the driver, and create a DSN in minutes. Unicode driver recommended for most setups.

ODBC driver architecture must match your client application's architecture — not the server.

Quick answer

  • Most 64-bit Windows apps use the x64 driver.
  • Legacy 32-bit apps need the x86 driver (even on 64-bit Windows).
  • Use the Unicode driver unless a legacy app requires ANSI.

Install and configure psqlODBC

  1. Determine architecture: Check your app's bitness. If unsure and the app is modern, x64 is likely.
  2. Download psqlODBC: Get the official installer for x64 or x86 from the PostgreSQL ODBC page.
  3. Install: Run the MSI and complete the wizard. Administrator rights may be required.
  4. Open ODBC Administrator: Start → search for ODBC Data Sources (64-bit) or ODBC Data Sources (32-bit).
  5. Create DSN: Add a System or User DSN → PostgreSQL Unicode (x64/x86) → set Host, Port (5432), Database, User, Password, SSL Mode.
  6. Test: Use the Test button to validate connectivity. If it fails, verify credentials, firewall, and SSL settings.

Which DSN should I use?

System DSN

Available to all users on the machine. Ideal for services and scheduled jobs.

User DSN

Only visible to the current user. Good for local development or per-user apps.

File DSN

Stored in a .dsn file and portable. Useful for sharing settings, but less common.

Troubleshooting — quick answers

Driver not listed

Open the matching ODBC Administrator (64-bit vs 32-bit). Reinstall the correct architecture if needed.

Architecture mismatch

A 32-bit app cannot use a 64-bit driver and vice versa. Install the driver that matches your app.

SSL or timeout errors

Try SSL Mode = Prefer or Require. Ensure firewall allows port 5432 and the server accepts your IP in pg_hba.conf.

Related guides

Disclaimer: This is an unofficial resource. PostgreSQL is a registered trademark of the PostgreSQL Community Association of Canada. Links may include affiliate tracking.