Some time back i had posted a question here looking for solution or ways to connect to a PostGresql database in QTP.

The solution for this is,

1) Download PostGresql ODBC driver from postgresql
Note: Do not use or download JDBC driver. For some technical reason QTP does not identify JDBC driver. I am not sure why.

2) Use the menu options for the data table.
a. Right-click on the data table.
b. Select Sheet -> Import -> From Database. The Database Query Wizard will appear

3)Using the "Specify SQL statement manually" option:

3.1. Click <Create> above the Connection String field.
3.2 Select the Machine Data Source tab.
3.3 Select the desired Data Source Name and click <OK>.
3.4 Enter the SQL statement into the SQL field.
3.5 Click <Finish>.

Hope this is useful to all those looking for a solution to connect Postgresql in QTP.

Prashanth Padmanabraju