Should/does SQLForeignKeys work (8.03.02)?

Should/does SQLForeignKeys work (8.03.02)?

am 07.08.2008 09:51:04 von Joost Kraaijeveld

Hi,

I am trying to retrieve the foreign keys of/to a PostgreSQL table
(PostgreSQL ODBC 8.03.02, PostgreSQL 8.3.3, unixodbc 2.2.11) using ODBC.
But whatever I try I do not get any results.

I assume that if I do

SQLForeignKeys(hstmt,
NULL, 0, /* Primary catalog */
NULL, 0, /* Primary schema */
szTable, SQL_NTS, /* Primary table */
NULL, 0, /* Foreign catalog */
NULL, 0, /* Foreign schema */
NULL, 0); /* Foreign table */

I should get all the foreign keys TO this table FROM another table.

Otherwise, doing

SQLForeignKeys(hstmt,
NULL, 0, /* Primary catalog */
NULL, 0, /* Primary schema */
NULL, 0, /* Primary table */
NULL, 0, /* Foreign catalog */
NULL, 0, /* Foreign schema */
szTable, SQL_NTS); /* Foreign table */

should get me all the foreign keys FROM this table TO another table.

BTW: I have tried it with non-null catalogs and schemas also.

Is that correct, and should it work?

TIA

Joost


--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Should/does SQLForeignKeys work (8.03.02)?

am 09.08.2008 01:24:14 von Hiroshi Inoue

Joost Kraaijeveld wrote:
> Hi,
>
> I am trying to retrieve the foreign keys of/to a PostgreSQL table
> (PostgreSQL ODBC 8.03.02, PostgreSQL 8.3.3, unixodbc 2.2.11) using ODBC.
> But whatever I try I do not get any results.

Seems the server side implementation of foreign keys was changed in 8.3
and 8.3.02 ODBC drivers didn't know it.
I beleive the bug was fixed in 8.3.0201.

regards,
Hiroshi Inoue

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Should/does SQLForeignKeys work (8.03.02)?

am 09.08.2008 01:59:19 von Tom Lane

Hiroshi Inoue writes:
> Seems the server side implementation of foreign keys was changed in 8.3
> and 8.3.02 ODBC drivers didn't know it.
> I beleive the bug was fixed in 8.3.0201.

So ... when will that be released?

regards, tom lane

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Should/does SQLForeignKeys work (8.03.02)?

am 09.08.2008 02:41:31 von Hiroshi Inoue

Tom Lane wrote:
> Hiroshi Inoue writes:
>> Seems the server side implementation of foreign keys was changed in 8.3
>> and 8.3.02 ODBC drivers didn't know it.
>> I beleive the bug was fixed in 8.3.0201.
>
> So ... when will that be released?

I would talk with Hiroshi Saito about the next release.
Anyway I have not been able to commit changes to psqlodbc
for some days because the server responds with the message
"waiting for anonymous's lock in /cvsroot/psqlodbc/psqlodbc".

Thanks.
Hiroshi Inoue

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc