Table of Contents
Here is the way to set up PostgreSQL ODBC Data Source in Windows.
Environment
- Windows 10 64-bit
Procedure
Install ODBC Driver
- Download and install PostgreSQL ODBC Driver. It’s on the page of PostgreSQL. This time I chose 32-bit version,
psqlodbc_09_05_0400-x86.zip
. - Open the zip file and execute msi installer in it. The driver will be installed
Add ODBC DataSource
- Open control panel. (Type Windows Key and R, and input “control” and press Enter key.)
- Press Ctrl and F, then type “odbc” to filter the items.
- This time I used 32-bit driver, so click “Set up ODBC data sources (32-bit)”.
- Click “Add” on the dialog to add new connection to PostgreSQL.
- After the dialog for adding data source appears, then choose “PostgreSQL Unicode” and click “Finish”.
- Fill the form of connection information. When you click Test button, form value will be tested.
- Data Source: the name of connection. You can define it freely.
- Description
- Database: Database name
- SSL Mode: recommend “allow”
- Server: server host name or ip address
- Port: 5432 in usual
- User Name
- Password
- Click Save, then new PostgreSQL ODBC data source will be created.