What is the possibility of recording foreign keys (a partial foreign key
implementation) in the database such that the ODBC interface can correctly
report them to client applications?  This would require an enhancement to
Postgres and to the ODBC driver for Postgres.  I have a problem with Access
97 not working properly with forms that contain sub forms representing
parent/child or master/detail tables.  For example: orders and orderlines.
I think this is caused by the lack of foreign key support.  I am basing this
conclusion on the SQL statement that Access sent through ODBC when looking
up records for the sub form.  The where clause of the SQL statement was
based on the primary key of the child or detail table.  The where clause
needs to be based on the column that is linked to the parent or master
table.  I already have indexes installed on both the primary key and the
field that links to the master/parent table.

I am willing to explore a work around and/or help with these enhancements.
This issue, at least for the moment,  appears to be a show stopper for me.
Any Suggestions?

Thanks, Michael

Thu, 25 Feb 1999 09:32:20 -0600
Michael Davis <michael.davis@prevuenet.com>
Foreign Keys


Michael Davis wrote:

> What is the possibility of recording foreign keys (a partial foreign key
> implementation) in the database such that the ODBC interface can correctly
> report them to client applications?  This would require an enhancement to
> Postgres and to the ODBC driver for Postgres.  I have a problem with Access
> 97 not working properly with forms that contain sub forms representing
> parent/child or master/detail tables.  For example: orders and orderlines.
> I think this is caused by the lack of foreign key support.  I am basing this
>

The driver does support SQLForeignKeys.  It does say it supports this function
in SQLFunctions.

However, the current implementation is based on the SPI/trigger stuff from the
pg_trigger table.  If you don't have any trigger info, then SQLForeignKeys will
not report anything.  This is most likely the problem.

Byron


Thu, 25 Feb 1999 10:37:57 -0500
Byron Nikolaidis <byronn@insightdist.com>
Re: [INTERFACES] Foreign Keys