RE: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255

From: Xuesong Gao <xgao(at)senturus(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: RE: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
Date: 2019-08-09 04:37:48
Message-ID: SN6PR16MB25742ED6A45B1D605C2BA3B4A9D60@SN6PR16MB2574.namprd16.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

We wrote our application that acts as a pseudo PostgreSQL server and we use PsqlODBC as client. Our table names are very long so we set it to 255. Our server actively sends this to client after password using parameter status message, it also returns 255 when client call "show max_identifier_length".

Based my test, SQLGetInfo does return 255 when parameter is SQL_MAX_TABLE_NAME_LEN, SQL_MAX_IDENTIFIER_LEN, etc. However, the table name is still truncated to 127 characters in SQLTables call. And I can tell that our server does return full length of table name (>128 chars) using Wireshark.

Thanks,
Song Gao

Attachment Content-Type Size
mylog_odbct32w_14504.log application/octet-stream 130.7 KB
psqlodbc_odbct32w_14504.log application/octet-stream 2.4 KB

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Inoue, Hiroshi 2019-08-10 00:56:04 Re: Regarding conversion of SQL_TSI_DAY operator for Datetimeadd function in ODBC driver
Previous Message Scott Goley 2019-08-08 15:00:41 Regarding conversion of SQL_TSI_DAY operator for Datetimeadd function in ODBC driver