ODBC: how to establish primary key & indexes
ODBC: how to establish primary key & indexes
От:
"Carl Shelbourne" <Carl.Shelbourne@marconi.com>
Дата:
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