31.03.2011 15:19, Dimitry Sibiryakov wrote: > SET NAMES UTF8; > CONNECT TEST; > CREATE TABLE w_t (a VARCHAR(30000) 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 the expression and throws as soon as it overflows the 32K limit. It works as designed. The only possible complaint here is that with the given constant arguments, the overflow check could happen at prepare time. True. But it would be impossible if the second argument would be non-constant, so the only choice would be to describe the output as varchar(32K) and hope it would fit (and throw at runtime otherwise). Dmitry ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel