pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RE: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
5+ messages / 2 participants
[nested] [flat]

* RE: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
@ 2019-08-09 04:37  Xuesong Gao <xgao@senturus.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Xuesong Gao @ 2019-08-09 04:37 UTC (permalink / raw)
  To: 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

Attachments:

  mylog_odbct32w_14504.log (application/octet-stream, 130.7K) download

  psqlodbc_odbct32w_14504.log (application/octet-stream, 2.4K) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
@ 2019-08-10 00:57  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Xuesong Gao <xgao@senturus.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Inoue, Hiroshi @ 2019-08-10 00:57 UTC (permalink / raw)
  To: Xuesong Gao <xgao@senturus.com>; +Cc: pgsql-odbc

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.com

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
@ 2019-08-13 12:11  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  0 siblings, 1 reply; 5+ messages in thread

From: Inoue, Hiroshi @ 2019-08-13 12:11 UTC (permalink / raw)
  To: Xuesong Gao <xgao@senturus.com>; +Cc: pgsql-odbc

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.com

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
@ 2019-08-13 14:11  Xuesong Gao <xgao@senturus.com>
  parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  0 siblings, 1 reply; 5+ messages in thread

From: Xuesong Gao @ 2019-08-13 14:11 UTC (permalink / raw)
  To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>; +Cc: pgsql-odbc

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.

[cid:image001.png@01D551BF.6FDC2740]

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

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png]<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&a...;
ウイルス フリー。 www.avg.com<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&a...;



Attachments:

image001.png (image/png, 7.7K) download view image
^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255
@ 2019-08-17 11:20  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Xuesong Gao <xgao@senturus.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Inoue, Hiroshi @ 2019-08-17 11:20 UTC (permalink / raw)
  To: Xuesong Gao <xgao@senturus.com>; +Cc: pgsql-odbc

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.com

Attachments:

image001.png (image/png, 7.7K) download view image
psqlodbc.patch (text/plain, 564B) download diff --git a/psqlodbc.h b/psqlodbc.h index 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
^ permalink raw reply [nested|flat] 5+ messages in thread


end of thread, other threads:[~2019-08-17 11:20 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09 04:37 RE: psqlodbc - table name is truncated to 127 characters even SQL_MAX_TABLE_NAME_LEN is set to 255 Xuesong Gao <xgao@senturus.com>
2019-08-10 00:57 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2019-08-13 12:11   ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2019-08-13 14:11     ` Xuesong Gao <xgao@senturus.com>
2019-08-17 11:20       ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>

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