Issue in Mapping varchar datatype of Postgre to Oracle - Mailing list pgsql-hackers
From | vidisha.shah@tcs.com |
---|---|
Subject | Issue in Mapping varchar datatype of Postgre to Oracle |
Date | |
Msg-id | OF8AD39DAE.0DEFE016-ON65257140.001E5EAD-65257140.001E8467@tcs.com Whole thread Raw |
Responses |
Re: Issue in Mapping varchar datatype of Postgre to Oracle
Re: Issue in Mapping varchar datatype of Postgre to Re: Issue in Mapping varchar datatype of Postgre to Oracle |
List | pgsql-hackers |
<br /><font color="blue" face="Arial" size="2">Hi</font><br /><br /><font color="blue" face="Arial" size="2">We are tryingto fetch records from Postgre Tables.</font><br /><br /><font color="blue" face="Arial" size="2">We are successfullyable to build connectivity. We are Using Postgre ODBC Driver (Unicode).</font><br /><br /><font color="blue"face="Arial" size="2">But when I query the tables of Postgre it is unable to map the datatype varchar of sourceTable.</font><br /><br /><font color="blue" face="Arial" size="2">We got following Reply from Oracle Support.</font><br/><br /><font face="sans-serif" size="2">---------------------------------------------------------------------------------------------------------</font><br /><br/><font face="sans-serif" size="2">Hi,</font><br /><br /><font face="sans-serif" size="2">.</font><br /><font face="sans-serif"size="2">DATA COLLECTED</font><br /><font face="sans-serif" size="2">===============</font><br /><br /><fontface="sans-serif" size="2">TRACE FILE</font><br /><font face="sans-serif" size="2">------------</font><br /><fontface="sans-serif" size="2">mylog_3388.log</font><br /><br /><font face="sans-serif" size="2">.</font><br /><font face="sans-serif"size="2">ISSUE VERIFICATION</font><br /><font face="sans-serif" size="2">===================</font><br /><br/><font face="sans-serif" size="2">Verified the issue by the trace file mylog_3388.log, which displays </font><br /><br/><font face="sans-serif" size="2">[4464]**** PGAPI_DescribeCol: res = 22422104, stmt->status = 2, !finished=1, !premature=0</font><br/><font face="sans-serif" size="2">[4464]getCharColumnSize: type=1043, col=2, unknown = 0</font><br/><font face="sans-serif" size="2">[4464]describeCol: col 2 fieldname = 'name'</font><br /><font face="sans-serif"size="2">[4464]describeCol: col 2 fieldtype = 1043</font><br /><font face="sans-serif" size="2">[4464]describeCol:col 2 column_size = 50</font><br /><font face="sans-serif" size="2">[4464]getCharColumnSize: type=1043,col=2, unknown = 0</font><br /><font face="sans-serif" size="2">[4464]describeCol: col 2 *pfSqlType = -9</font><br/><font face="sans-serif" size="2">[4464]describeCol: col 2 *pcbColDef = 50</font><br /><font face="sans-serif"size="2">[4464]describeCol: col 2 *pibScale = 0</font><br /><font face="sans-serif" size="2">[4464]describeCol:col 2 *pfNullable = 1</font><br /><br /><font face="sans-serif" size="2">.</font><br /><font face="sans-serif"size="2">CAUSE DETERMINATION</font><br /><font face="sans-serif" size="2">====================</font><br/><font face="sans-serif" size="2">VARCHAR datatype from PostgreSQL is translatedby your ODBC driver in an unsupported datatype for HSODBC.</font><br /><br /><br /><font face="sans-serif" size="2">CAUSEJUSTIFICATION</font><br /><font face="sans-serif" size="2">====================</font><br /><font face="sans-serif"size="2">In the trace file, you get the datatype from postgreSQL </font><br /><font face="sans-serif" size="2">====>1043VARCHAR(50)</font><br /><br /><font face="sans-serif" size="2">then you get the datatype that ODBC driveris mapping to get back to Oracle</font><br /><font face="sans-serif" size="2">====>[4464]describeCol: col 2 *pfSqlType= -9</font><br /><br /><font face="sans-serif" size="2">If you look at in the Note 252548.1, </font><br /><fontface="sans-serif" size="2">-9 is SQL_WVARCHAR </font><br /><br /><font face="sans-serif" size="2">and unfortunatelythis ODBC datatype is not supported by the Generic Connectivity agent (HSODBC).</font><br /><br /><font face="sans-serif"size="2">To get confirmation, please have a look in the documentation:</font><br /><br /><font face="sans-serif"size="2">Oracle® Database Heterogeneous Connectivity Administrator's Guide</font><br /><font face="sans-serif"size="2">10g Release 2 (10.2)</font><br /><font face="sans-serif" size="2">Part Number B14232-01</font><br/><font face="sans-serif" size="2">B Data Type Mapping for Generic Connectivity</font><br /><font face="sans-serif"size="2">B.1 Mapping ANSI Data Types to Oracle Data Types Through an ODBC Interface</font><br /><br /><fontface="sans-serif" size="2">.</font><br /><font face="sans-serif" size="2">POTENTIAL SOLUTION(S)</font><br /><fontface="sans-serif" size="2">======================</font><br /><font face="sans-serif" size="2">Please check if inyour ODBC driver there is any option to differently map the SQL_WVARCHAR d</font><br /><font face="sans-serif" size="2">atatype</font><br/><font face="sans-serif" size="2">-----------------------------------------------------------------------------------------------------------</font><br /><br/><font color="blue" face="Arial" size="2">Can you please suggest why varchar datatype is not correctly identified andwhat is the path to get solution?</font><br /><br /><font color="blue" face="Arial" size="2">Thanks & Regards</font><br/><font color="blue" face="Arial" size="2"><br /> Vidisha B Shah</font><br /><font face="sans-serif" size="2"><br/> Vidisha B Shah<br /> Tata Consultancy Services Limited<br /> Mailto: vidisha.shah@tcs.com<br /> Website: http://www.tcs.com</font><pre> Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privilegedinformation. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copyingof the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you havereceived this communication in error, please notify us by reply e-mail or telephone and immediately and permanently deletethe message and any attachments. Thank you </pre>
pgsql-hackers by date: