Oracle Database Gateway For ODBC, Connecting To PostgreSQL 9.2, Gateway Truncating Bytea Column (Doc ID 2275952.1)

Last updated on JUNE 21, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.

Symptoms

Running Oracle Database Gateway for ODBC and changing the odbc.ini to include the ByteaAsLongVarBinary=1, like below:

UseDeclareFetch = 1
ByteaAsLongVarBinary = 1
MaxVarcharSize = 255
MaxLongVarcharSize = 16384


When running the select statement - select "icon" from "roadimage"@imagedb where "image_id"=228982869;

This statement is continuing to return. However, checking the trace file, the odbc driver is actually returning the full data for the icon column:

[47902941418176]CI_read_fields: fieldname='icon', adtid=17, adtsize=-1, atttypmod=-1 (rel,att)=(11766915,4)
[47902941418176]QR_fetch_tuples: past CI_read_fields: num_fields = 1
[47902941418176]MALLOC: tuple_size = 100, size = 1600
[47902941418176]QR_next_tuple: inTuples = true, falling through: fcount = 0, fetch_number = 0
[47902941418176]read 61, global_socket_buffersize=4096
[47902941418176]qresult: len=4066, buffer='\xffd8ffe000104a46494600010100000100010000ffdb0043000d090a0b0a080d0b0a0b0e0e0d0f13201513121213271c1e17202e2931302e292d2c333a4a3e333646372c2d405741464c4e525352323e5a615a50604a51524fffdb0043010e0e
0e131113261515264f352d354f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4fffc00011080050007803012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b51
00002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a9293949596
9798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031
104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7

Why the data which id clearly being returned by the odbc driver in not being returned from within Oracle using DG4ODBC.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms