Re: Severe bug in SQLPrimaryKeys function in psqlODBC 09.06.0500

From: "Jan-Peter Seifert" <Jan-Peter(dot)Seifert(at)gmx(dot)de>
To: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Severe bug in SQLPrimaryKeys function in psqlODBC 09.06.0500
Date: 2017-09-28 14:35:42
Message-ID: trinity-12e82951-4b32-4775-8ef3-298714550d67-1506609342198@3c-app-gmx-bs58
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hello Hiroshi,</div>

<div>&nbsp;</div>

<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Donnerstag, 28. September 2017 um 15:10 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Inoue, Hiroshi&quot; &lt;h-inoue(at)dream(dot)email(dot)ne(dot)jp&gt;<br/>
<b>An:</b>&nbsp;&quot;Jan-Peter Seifert&quot; &lt;Jan-Peter(dot)Seifert(at)gmx(dot)de&gt;<br/>
<b>Cc:</b>&nbsp;pgsql-odbc(at)postgresql(dot)org<br/>
<b>Betreff:</b>&nbsp;Re: [ODBC] Severe bug in SQLPrimaryKeys function in psqlODBC 09.06.0500</div>

<div name="quoted-content">
<div style="background-color: rgb(255,255,255);">Hi Peter,<br/>
&nbsp;
<div class="moz-cite-prefix">On 2017/09/28 19:05, Jan-Peter Seifert wrote:</div>

<blockquote>
<pre>Hello,

there seems to be a new bug in the SQLPrimaryKeys function - e.g. called with (042C0FB0, , 0, , 0, table, -3).
It generates this SELECT:
select ta.attname, ia.attnum, ic.relname, n.nspname, tc.relname from pg_catalog.pg_attribute ta, pg_catalog.pg_attribute ia, pg_catalog.pg_class tc, pg_catalog.pg_index i, pg_catalog.pg_namespace n, pg_catalog.pg_class ic where tc.relname = E&#39;table&#39; AND n.nspname = E&#39;xxx&#39; AND tc.oid = i.indrelid AND n.oid = tc.relnamespace AND i.indisprimary = &#39;t&#39; AND ia.attrelid = i.indexrelid AND ta.attrelid = i.indrelid AND ta.attnum = i.indkey[ia.attnum-1] AND (NOT ta.attisdropped) AND (NOT ia.attisdropped) AND ic.oid = i.indexrelid order by ia.attnum&#12288;select ta.attname, ia.attnum, ic.relname, n.nspname, NULL from pg_catalog.pg_attribute ta, pg_catalog.pg_attribute ia, pg_catalog.pg_class ic, pg_catalog.pg_index i, pg_catalog.pg_namespace n where ic.relname = E&#39;ktom_pkey&#39; AND n.nspname = E&#39;mbs&#39; AND ic.oid = i.indexrelid AND n.oid = ic.relnamespace AND ia.attrelid = i.indexrelid AND ta.attrelid = i.indrelid AND ta.attnum = i.indkey[ia.attnum-1] AND (NOT ta.attisdropped) AND (NOT ia.attisdropped) order by ia.attnum

In 09.06.0410 everything is okay.</pre>
</blockquote>
<br/>
Thanks for the report.<br/>
Could you please try the test drivers 9.6.0502 on Windows at<br/>
&nbsp; <a href="http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/" target="_blank">http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/</a> ?<br/>
<br/>
regards,<br/>
Hiroshi Inoue<br/>
&nbsp;
<blockquote>
<pre>I have the psqlODBC logs in case you need them.

Best regards,

Peter
</pre>
</blockquote>

<div>
<div>version&nbsp;9.6.0502 doesn&#39;t show this error.</div>

<div>&nbsp;</div>

<div>Thank you very much!</div>

<div>&nbsp;</div>

<div>Best regards,</div>

<div>&nbsp;</div>

<div>Peter</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>

Attachment Content-Type Size
unknown_filename text/html 2.8 KB

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Gonzalo Ordonez 2017-09-28 18:09:41 ODBC connectin string for Postgres db needed
Previous Message Inoue, Hiroshi 2017-09-28 13:10:16 Re: Severe bug in SQLPrimaryKeys function in psqlODBC 09.06.0500