pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Should/does SQLForeignKeys work (8.03.02)?
4+ messages / 3 participants
[nested] [flat]

* Should/does SQLForeignKeys work (8.03.02)?
@ 2008-08-07 07:51  Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
  0 siblings, 1 reply; 4+ messages in thread

From: Joost Kraaijeveld @ 2008-08-07 07:51 UTC (permalink / raw)
  To: pgsql-odbc

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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Should/does SQLForeignKeys work (8.03.02)?
@ 2008-08-08 23:24  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
  0 siblings, 1 reply; 4+ messages in thread

From: Hiroshi Inoue @ 2008-08-08 23:24 UTC (permalink / raw)
  To: J.Kraaijeveld@Askesis.nl; +Cc: pgsql-odbc

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Should/does SQLForeignKeys work (8.03.02)?
@ 2008-08-08 23:59  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Hiroshi Inoue <inoue@tpf.co.jp>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2008-08-08 23:59 UTC (permalink / raw)
  To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: J.Kraaijeveld@Askesis.nl; pgsql-odbc

Hiroshi Inoue <inoue@tpf.co.jp> 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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Should/does SQLForeignKeys work (8.03.02)?
@ 2008-08-09 00:41  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Hiroshi Inoue @ 2008-08-09 00:41 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: J.Kraaijeveld@Askesis.nl, pgsql-odbc@postgresql.org, Hiroshi Saito <z-saito@guitar.ocn.ne.jp>

Tom Lane wrote:
> Hiroshi Inoue <inoue@tpf.co.jp> 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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2008-08-09 00:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-08-07 07:51 Should/does SQLForeignKeys work (8.03.02)? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2008-08-08 23:24 ` Hiroshi Inoue <inoue@tpf.co.jp>
2008-08-08 23:59   ` Tom Lane <tgl@sss.pgh.pa.us>
2008-08-09 00:41     ` Hiroshi Inoue <inoue@tpf.co.jp>

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