pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carl Shelbourne <Carl.Shelbourne@marconi.com>
To: pgsql-interfaces@postgresql.org
Subject: ODBC: how to establish primary key & indexes
Date: Tue, 2 Jan 2001 14:11:18 +0000
Message-ID: <802569C8.004DF48F.00@marconicomms.com> (raw)



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





Message-ID: <802569C8.004DF48F.00@marconicomms.com>
Permalink:  ../802569C8.004DF48F.00@marconicomms.com/
Also on:    postgresql.org/message-id/802569C8.004DF48F.00@marconicomms.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Carl.Shelbourne@marconi.com
  Subject: Re: ODBC: how to establish primary key & indexes
  In-Reply-To: <802569C8.004DF48F.00@marconicomms.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox