I am connecting to Postgres SQL through unixodbc driver manager.

I created a table using interactive tool isql.

$ isql psql
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
SQL> create table t1(f1 int, f2 int, primary key (f1));
SQLRowCount returns 0
SQL> create index idx on t1(f1);
SQLRowCount returns 0

When I write a program to connect to the postgres sql via odbc interface SQLStatistics returns error.
The same code works with mysql server as target database.

retValue = SQLStatistics(hstmtmeta, NULL, 0, NULL, SQL_NTS, (SQLCHAR*) tableName, SQL_NTS, SQL_INDEX_ALL, SQL_QUICK);
with the parameters being appropriately allocated

SQLStatistics returns error. Have no idea why?

could anybody please help me with this?