Re: [Firebird-devel] sqllen of very long string fields

2011-03-31 Thread Dalton Calford
The 32k limit on string length should be removed. With UTF8 and other internationalization character sets, we are faced with a constantly shrinking string space. Any new api work should consider either increasing the 32k limit to 65k or better yet, finding a way to eliminate the hard limit with som

Re: [Firebird-devel] sqllen of very long string fields

2011-03-31 Thread Dimitry Sibiryakov
31.03.2011 14:08, Dmitry Yemanov wrote: > 31.03.2011 15:52, Dimitry Sibiryakov wrote: > >> It is not RPAD or INSERT that throw error, but SELECT because it has to >> convert 3 >> russian letters into 6 of 12 bytes in UTF8. > > Then I agree it should be throwing an error during prepare.

Re: [Firebird-devel] sqllen of very long string fields

2011-03-31 Thread Dmitry Yemanov
31.03.2011 15:52, Dimitry Sibiryakov wrote: > It is not RPAD or INSERT that throw error, but SELECT because it has to > convert 3 > russian letters into 6 of 12 bytes in UTF8. Then I agree it should be throwing an error during prepare. Dmitry --

Re: [Firebird-devel] sqllen of very long string fields

2011-03-31 Thread Dimitry Sibiryakov
31.03.2011 13:38, Dmitry Yemanov wrote: > 31.03.2011 15:19, Dimitry Sibiryakov wrote: > >> SET NAMES UTF8; >> CONNECT TEST; >> CREATE TABLE w_t (a VARCHAR(3) CHARACTER SET win1251); >> INSERT INTO w_t VALUES (RPAD(_win1251'уй', 32000, _win1251'ё'); >> SET SQLDA_DISPLAY on; >> SELECT a FROM w_t;

Re: [Firebird-devel] sqllen of very long string fields

2011-03-31 Thread Dmitry Yemanov
31.03.2011 15:19, Dimitry Sibiryakov wrote: > SET NAMES UTF8; > CONNECT TEST; > CREATE TABLE w_t (a VARCHAR(3) CHARACTER SET win1251); > INSERT INTO w_t VALUES (RPAD(_win1251'уй', 32000, _win1251'ё'); > SET SQLDA_DISPLAY on; > SELECT a FROM w_t; There's no longish field here. RPAD evaluates t

Re: [Firebird-devel] sqllen of very long string fields

2011-03-31 Thread Dimitry Sibiryakov
31.03.2011 13:10, Dmitry Yemanov wrote: > However, I'm wondering how did you manage to create a longer field. SET NAMES UTF8; CONNECT TEST; CREATE TABLE w_t (a VARCHAR(3) CHARACTER SET win1251); INSERT INTO w_t VALUES (RPAD(_win1251'уй', 32000, _win1251'ё'); SET SQLDA_DISPLAY on; SELECT a FROM

Re: [Firebird-devel] sqllen of very long string fields

2011-03-31 Thread Dmitry Yemanov
31.03.2011 15:00, Dimitry Sibiryakov wrote: > > If maximal length of string field exceed 32k, sqllen is silently set to > 32764. Is it > bug or feature? Maximum string size (based on a char/varchar field or being a runtime value) is 32K - 1, so I suppose sqllen should be 32767. However, I'm won