Version 10 FC4 Replace issue 528: Maximum output rowsize (32767) exceeded.
Posted in 2006
We are testing version 10 FC4 and we have run into a problem with a
query that we don't get with 9.21.
We have a sql that is returning a 528 error:
528: Maximum output rowsize (32767) exceeded.
The SQL selects a series of replace statements. Doing some arithmetic
it looks like replace now returns a lvarchar(2048).
Is this a know issue/feature? The work around is to of course write
something like
replace(c.blah, "blah", "blah blah")::lvarchar(512)
By the way non of the fields in the replace are lvarchars.
My question is there a setting to make replace work like version 9.21
(correctly)? Or is there a bug fix? or is this a feature?
Here is a repeatable case for your fun.
create table test_error_528_with_replace(
id serial,
o_id integer,
date1 date,
blah1 varchar(64),
blah2 varchar(64),
blah3 varchar(64),
blah4 varchar(64),
blah5 varchar(64),
blah6 varchar(64),
blah7 varchar(64),
blah8 varchar(64),
blah9 char(2),
blah10 varchar(25),
blah11 varchar(25),
blah12 varchar(64),
blah13 varchar(255),
blah14 varchar(255),
blah15 varchar(255),
blah16 varchar(255),
blah17 varchar(255),
blah18 char(1),
date2 date
) ;
select
id,
o_id,
date1,
replace(blah1,'blah','blah blah') stName,
replace(blah2,'blah','blah blah') stContact,
replace(blah3,'blah','blah blah') stStreet1,
replace(blah4,'blah','blah blah') stStreet2,
replace(blah5,'blah','blah blah') stStreet3,
replace(blah6,'blah','blah blah') stCity,
replace(blah7,'blah','blah blah') stState,
replace(blah8,'blah','blah blah') stZip,
replace(blah9,'blah','blah blah') stCountry,
replace(blah10,'blah','blah blah') stPhone,
replace(blah11,'blah','blah blah') stFax,
replace(blah12,'blah','blah blah') stEmail,
replace(blah13,'blah','blah blah') stAux1,
replace(blah14,'blah','blah blah') stAux2,
replace(blah15,'blah','blah blah') stAux3,
replace(blah16,'blah','blah blah') stAux4,
replace(blah17,'\\"','\\"\\"') stAux5,
blah18,
date2 - 1 units day dtTermination
From
test_error_528_with_replace
;
When I run it I get:
select
id,
o_id,
date1,
replace(blah1,'blah','blah blah') stName,
replace(blah2,'blah','blah blah') stContact,
replace(blah3,'blah','blah blah') stStreet1,
replace(blah4,'blah','blah blah') stStreet2,
replace(blah5,'blah','blah blah') stStreet3,
replace(blah6,'blah','blah blah') stCity,
replace(blah7,'blah','blah blah') stState,
replace(blah8,'blah','blah blah') stZip,
replace(blah9,'blah','blah blah') stCountry,
replace(blah10,'blah','blah blah') stPhone,
replace(blah11,'blah','blah blah') stFax,
replace(blah12,'blah','blah blah') stEmail,
replace(blah13,'blah','blah blah') stAux1,
replace(blah14,'blah','blah blah') stAux2,
replace(blah15,'blah','blah blah') stAux3,
replace(blah16,'blah','blah blah') stAux4,
# ^
# 528: Maximum output rowsize (32767) exceeded.
#
replace(blah17,'\\"','\\"\\"') stAux5,
blah18,
date2 - 1 units day dtTermination
From
test_error_528_with_replace
;