ODBC: how to establish primary key & indexes

From: "Carl Shelbourne" <Carl(dot)Shelbourne(at)marconi(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ODBC: how to establish primary key & indexes
Date: 2001-01-02 14:11:18
Message-ID: 802569C8.004DF48F.00@marconicomms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Charlie Crissman 2001-01-02 14:28:30 RE: pgAdmin
Previous Message mlw 2001-01-02 13:31:46 Re: [INTERFACES] Re: PHP and PostgreSQL