ODBC guide

PostgreSQL ODBC driver for Windows — psqlODBC x64 & x86 setup

Install psqlODBC on Windows to connect Excel, Access, Power BI and other ODBC applications to PostgreSQL. Covers x64 vs x86 selection, DSN setup and common errors.

PostgreSQL ODBC driver for Windows — psqlODBC

psqlODBC is the official ODBC driver for PostgreSQL. It allows Windows applications that use the ODBC API — such as Microsoft Excel, Access, Power BI, Tableau, and ODBC-capable programming languages — to connect to a PostgreSQL database. It is available in both x64 (64-bit) and x86 (32-bit) versions.

x64 vs x86 — which to install?

ScenarioInstall
64-bit applications (Excel 64-bit, Power BI, most modern apps)psqlODBC x64
32-bit applications (older Excel, Access 32-bit, legacy apps)psqlODBC x86
Both 32-bit and 64-bit apps on the same machineInstall both x64 and x86
Unsure which your app usesCheck Task Manager → Details → if app name shows *32, it is 32-bit
You can install both x64 and x86 versions side by side on Windows without conflict. They appear separately in ODBC Data Source Administrator.

Download and install psqlODBC

  • 1

    Download from the official source

    Get psqlODBC from postgresql.org/ftp/odbc/versions/msi/. Download the latest psqlodbc_xx_xx_xxxx-x64.zip for 64-bit or psqlodbc_xx_xx_xxxx-x86.zip for 32-bit.

  • 2

    Run the MSI installer

    Extract the ZIP and run the MSI file as Administrator. Follow the simple wizard — no configuration is needed during install.

  • 3

    Open ODBC Data Source Administrator

    Press Win+S → search ODBC. Open ODBC Data Sources (64-bit) for x64 or ODBC Data Sources (32-bit) for x86.

  • 4

    Add a new DSN

    Click Add → select PostgreSQL Unicode (or PostgreSQL ANSI for legacy apps) → fill in the connection details:

    DSN configuration fields
    Data Source: MyPostgresDB
    Database: mydbname
    Server: localhost (or server IP)
    Port: 5432
    User Name: postgres
    Password: your_password
  • 5

    Test the connection

    Click Test in the DSN setup dialog. You should see Connection successful. Click Save.

System DSN vs User DSN vs File DSN

DSN TypeAvailable toUse when
User DSNCurrent user onlyPersonal use, development
System DSNAll users and servicesShared apps, Windows services, IIS
File DSNAny machine with the driverPortable connection, shared configs

ODBC driver questions

PostgreSQL ODBC driver not showing in ODBC administrator
Make sure you are opening the correct bitness of ODBC administrator. The 64-bit administrator is at C:\Windows\System32\odbcad32.exe and the 32-bit one is at C:\Windows\SysWOW64\odbcad32.exe. A 64-bit driver only appears in the 64-bit administrator.
Unicode vs ANSI driver — which to use?
Use PostgreSQL Unicode for all modern applications. Unicode supports all character sets and locales. Use ANSI only for very old legacy applications that do not support Unicode.
Connection test fails with "could not connect to server"
Check: (1) PostgreSQL service is running, (2) firewall allows port 5432, (3) pg_hba.conf allows connections from your client IP. For local connections the server should be localhost or 127.0.0.1.

Need to allow remote connections?

Configure pg_hba.conf and Windows Firewall for ODBC over the network.

Remote connections guide