Row buffer width exceeded. Try using fe...

The stable tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.
Post Reply
simonbosti
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 08.03.2013, 17:54

Row buffer width exceeded. Try using fe...

Post by simonbosti »

Hello,

Yesterday I downloaded ZeosLib and mentioned in the subject problem began. Since yesterday I am having message
Row buffer width exceeded. Try using fewer or longer columns in SQL query.
Strange is that before I had one of previous versions of ZeosLib and haven't this problem. Of course it goes with exceeding record (row) length, which can't be higher than 64 kilobytes but problem which doesn't existed, suddenly began - with new download. I did quick investigation and found that it raises in constructor
constructor TZRowAccessor.Create(ColumnsInfo: TObjectList; ConSettings: PZConSettings);
" becouse condition
if FColumnsSize > SizeOf(TZByteArray)-1 then
raise EZSQLException.Create(SRowBufferWidthExceeded);
returns the "True". Going further my table structure is as below:

"
(
id serial NOT NULL,
name character varying(1024),
description character varying(16384),
visiting_tries integer,
...
"

So, I quickly found that method
... function TZRowAccessor.GetColumnSize(ColumnInfo: TZColumnInfo): Integer; ...
counts character varying field length in this way
stUnicodeString:
Result := 2 * ColumnInfo.Precision + 2;

and ColumnInfo.Precision equals to twice field length defined in table. Finally column size equals 4 * length of character varying length in table what it my case giving exception when reading field >description< (exceeding maximum row size)...

It's probably bug.. what if character varying field will have defined length higher than 16384... haven't tried but it looks like no way to read?

I use Delphi XE3 Professional and work on PostgreSQL v9 database.

Besides described problem... 64k row size is a big disadvantage becouse maximum row size in PostgreSQL is 1.6 TB (as wrote here http://www.postgresql.org/about/ :))

I wrote for the first time on this forum, used ZeosLib from time to time since few years... and want write that you do great job guys, even if it still needs some work ;)
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@simonbosti,

ZEOS 7.1 which I use for a few months does not have this limitation.

Michal
simonbosti
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 08.03.2013, 17:54

Post by simonbosti »

Latest stable one is 7.0.3 ... okay - I'll try experimental one. Thanks.
simonbosti
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 08.03.2013, 17:54

Post by simonbosti »

I've downloaded 7.1 and latest revision 2204 - as far works good :)
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@simonbosti,

One thing you should know.
For the sake of compatibility for PostgreSQL with older Zeos in 7.1 you may add:
TZConnection.Properties.Values ​​['Undefined_Varchar_AsString_Length = xxx'] to define your own FieldSize(xxx=255 for old ZEOS compatibility).
http://zeos.firmos.at/viewtopic.php?t=3684
http://zeos.firmos.at/viewtopic.php?t=3 ... c&start=15

Michal
Post Reply