ODBC large binary data support

From: myaddress(at)gmx-topmail(dot)de
To: pgsql-odbc(at)postgresql(dot)org
Subject: ODBC large binary data support
Date: 2017-01-04 14:34:57
Message-ID: trinity-7f1608ac-250d-45ec-a3e6-00a77774c25c-1483540496999@3capp-gmx-bs33
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>Hello,</div>

<div>&nbsp;</div>

<div>Recently I successfully stored a 3GB BLOB in PostgreSQL V9.6.1 via psql-odbc V09.05.0400, but I was not able to read it afterwards. I got the error message &quot;Error reading from large object.&quot; for the very first SQLGetData call. I debugged it and found out that psql-odbc uses &quot;lo_lseek&quot; and &quot;lo_tell&quot; in &quot;lobj.c&quot; which limit the amount of data to 2GB (int32 usage). In &quot;lobj.c&quot; there is even the comment /* XXX: Should we use lo_lseek64? */ and /* XXX: Should we use lo_tell64? */.</div>

<div>I temporarily changed the code to use lo_lseek64 and lo_tell64 and I could read the 3GB BLOB.</div>

<div>So, could you please change the official psql-odbc to use lo_lseek64 and lo_tell64?</div>

<div>&nbsp;</div>

<div>I found a discussion about that here:</div>

<div>https://www.postgresql.org/message-id/CAB7nPqSc7M_wJYjZEfQ7QyBg1mbo3_Dhg0Jeiqx7HpO+46HFTA@mail.gmail.com</div>

<div>&nbsp;</div>

<div>It tells that the 64-bit functions are not supported prior to PostgreSQL V9.3. My suggestion would be either dropping the support for old versions or a dynamic switch between the 64-bit and the 32-bit functions based on the server version.</div>

<div>I hope that you support that.</div>

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

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div class="signature">&nbsp;</div></div></body></html>

Attachment Content-Type Size
unknown_filename text/html 1.5 KB

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Inoue, Hiroshi 2017-01-08 08:08:07 Re: ODBC large binary data support
Previous Message Alvaro Herrera 2016-12-27 02:58:44 Re: [pgsql-advocacy] looks nice