ODBC: how to establish primary key & indexes - Mailing list pgsql-interfaces

From Carl Shelbourne
Subject ODBC: how to establish primary key & indexes
Date
Msg-id 802569C8.004DF48F.00@marconicomms.com
Whole thread Raw
List pgsql-interfaces

I am trying to write a generic ODBC wrapper (on Solaris using unixODBC) in c++
and I need to query the DB to find out what fields are the primary key(s), and
other unique indexes.

I've tried querying pg_indexes but the indexfdef column is of datatype "text",
not a SQL92 standard data type, which is returning a datatype of "-1". I am
assuming I have missed something out in my configuration of the ODBC
interface/driver????

Is there an easy way to query the db to find out the fields that are the primary
key(s) and any other (unique) indexes that have been created using ODBC
queries???

Thanks

Carl




pgsql-interfaces by date:

Previous
From: Dave Page
Date:
Subject: RE: ODBC Driver Update...
Next
From: Charlie Crissman
Date:
Subject: RE: pgAdmin