pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sbragion Denis <infotecn@tin.it>
To: David Hartwig <daveh@insightdist.com>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Can't Update from MS Access  (Was - Insight ODBC driver)
Date: Sat, 18 Apr 1998 10:09:15 +0200
Message-ID: <3.0.5.32.19980418100915.007f1c60@MBox.InfoTecna.com> (raw)
In-Reply-To: <35379956.9CF38CD0@insightdist.com>
References: <199804170615.IAA01926@gate.va.fh-ulm.de>

Hello,

At 14.03 17/04/98 -0400, you wrote:
From the FAQ part:
...
>How do I get my application to recognize primary keys?  
>SQLPrimaryKeys() is implemented in the driver.   As of the driver's
release, >however, there was no way to query the PostgreSQL system tables
to discover a >table's primary key.  Therefore the following convention was
used.   The driver >queries the system tables in search of a unique index
named with the using >"{table}_key".   Example: 
>create table foo  (id integer, name varchar(20)); 
>create unique index foo_key on foo using btree(id);
>Creating this index does not guarantee that your application is using the
>SQLPrimaryKeys() call.   For example, MS Access 7.0 & 97 require the user
to >manually specify the key at link time.  This key specification is
required to modify >a table from MA Access.   See "Why does the PosgreSQL
backend crash every time I >browse some tables in MS Access?". 

actually when you specify something like:

create table test06
        (
                Posizione int4 not null primary key,
                Testo char(50),
                Campo float8,
                DataEOra datetime
        );

postgres automagically creates an index named test06_pkey (note the 'p' in
fron of 'key'). I think changing the ODBC driver to look for such type of
index, instead of '{table}_key', would simplify things a lot.

Hope it helps.

P.S. My compliments to all the great development effort coming up on PostODBC.



	Dr. Sbragion Denis
	InfoTecna
	Tel, Fax: +39 39 2324054
	URL: http://space.tin.it/internet/dsbragio



view thread (2+ messages)

Message-ID: <3.0.5.32.19980418100915.007f1c60@MBox.InfoTecna.com>
Permalink:  ../3.0.5.32.19980418100915.007f1c60@MBox.InfoTecna.com/
Also on:    postgresql.org/message-id/3.0.5.32.19980418100915.007f1c60@MBox.InfoTecna.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: infotecn@tin.it, daveh@insightdist.com
  Subject: Re: [INTERFACES] Can't Update from MS Access  (Was - Insight ODBC driver)
  In-Reply-To: <3.0.5.32.19980418100915.007f1c60@MBox.InfoTecna.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