pacman82/odbc-api

How to dynamic control odbc-api BufferDescription Text max_str_len

Closed this issue · 1 comments

When using odbc-api currently, the Text storage content of the database is dynamic. If a certain column of text stored in the database has a length of 1500, I set Text:: max_str_len length to 1280, and an error of content truncation will occur.
However, when I set the max_str_len length of 9999, the content of the stored column may be larger than 9999, resulting in an uncontrollable content length, and when the odbc-api reads, the text column will be truncated.

If I set the default value according to the maximum value of Text in the Pg database, there will be a problem of memory allocation failure.

So, please tell me how to dynamically control the Text::max_str_len of odbc-api.

Memory needs to be preallocated in ODBC. See #299 .