From: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
To: Xuesong Gao <xgao@senturus.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
Date: Sat, 17 Aug 2019 20:20:37 +0900
Message-ID: <aee86a4d-8de3-2f8c-e499-9506e85f25e8@dream.email.ne.jp> (raw)
In-Reply-To: <SN6PR16MB2574B51FD1CE999BD2FF949BA9D20@SN6PR16MB2574.namprd16.prod.outlook.com>
References: <SN6PR16MB25742ED6A45B1D605C2BA3B4A9D60@SN6PR16MB2574.namprd16.prod.outlook.com>
<6713b9b2-8cdf-39ec-3188-b4444a3c5db6@dream.email.ne.jp>
<e65a0c9c-30b0-d2ab-e662-feff3aaef526@dream.email.ne.jp>
<SN6PR16MB2574B51FD1CE999BD2FF949BA9D20@SN6PR16MB2574.namprd16.prod.outlook.com>
Hi,
Sorry for the late reply.
I have changed my local branch but wouldn't push it to git at once.
Instead I attached the simplest fix for your system.
Please try the patch.
regards,
Hiroshi Inoue
On 2019/08/13 23:11, Xuesong Gao wrote:
>
> It works!
>
> Do you keep your GitHub source code up-to-date? We took version 09.06
> and customized it, added a load database button (so that users can
> browse instead of type in) for example. So I would like to merge your
> changes to our version.
>
> Here is what our driver looks like, and I can share my code with you
> if you want to add load databases function.
>
> Thanks,
>
> Song Gao
>
> *From:*Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
> *Sent:* Tuesday, August 13, 2019 8:11 AM
> *To:* Xuesong Gao <xgao@senturus.com>
> *Cc:* pgsql-odbc@postgresql.org
> *Subject:* Re: psqlodbc - table name is truncated to 127 characters
> even SQL_MAX_TABLE_NAME_LEN is set to 255
>
> Could you please try the test drivers on Windows 11.00.0300 at
> https://winpg.jp/~inoue/psqlodbc/index.html
> ?
>
> regards,
> Hiroshi Inoue
>
> On 2019/08/10 9:57, Inoue, Hiroshi wrote:
>
> Hi,
>
> I would examine the issue.
>
> regards,
> Hiroshi Inoue
>
> On 2019/08/09 13:37, Xuesong Gao wrote:
>
> 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
>
---
このメールは、AVG によってウイルス チェックされています。
http://www.avg.comAttachments:image001.png (image/png, 7.7K) downloadview imagepsqlodbc.patch (text/plain, 564B) downloaddiff --git a/psqlodbc.h b/psqlodbc.hindex b91969d..f7a8168 100644--- a/psqlodbc.h+++ b/psqlodbc.h@@ -86,7 +86,7 @@ void debug_memory_check(void);
#define NAMEDATALEN_V73 64
#ifndef NAMESTORAGELEN
-#define NAMESTORAGELEN 64+#define NAMESTORAGELEN 256
#endif /* NAMESTORAGELEN */
#ifndef WIN32
@@ -384,7 +384,7 @@ BOOL isSqlServr(void);
#define POSTGRES_SYS_PREFIX "pg_"
/* Info limits */
-#define MAX_INFO_STRING 128+#define MAX_INFO_STRING 256
/* POSIX defines a PATH_MAX.( wondows is _MAX_PATH ..) */
#ifndef PATH_MAX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: h-inoue@dream.email.ne.jp, xgao@senturus.com
Subject: Re: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
In-Reply-To: <aee86a4d-8de3-2f8c-e499-9506e85f25e8@dream.email.ne.jp>
References: <SN6PR16MB25742ED6A45B1D605C2BA3B4A9D60@SN6PR16MB2574.namprd16.prod.outlook.com> <6713b9b2-8cdf-39ec-3188-b4444a3c5db6@dream.email.ne.jp> <e65a0c9c-30b0-d2ab-e662-feff3aaef526@dream.email.ne.jp> <SN6PR16MB2574B51FD1CE999BD2FF949BA9D20@SN6PR16MB2574.namprd16.prod.outlook.com> <aee86a4d-8de3-2f8c-e499-9506e85f25e8@dream.email.ne.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox