Page 1 of 1

Row buffer width exceeded. Try using fe...

Posted: 08.03.2013, 18:06
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 ;)

Posted: 08.03.2013, 19:14
by miab3
@simonbosti,

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

Michal

Posted: 08.03.2013, 19:19
by simonbosti
Latest stable one is 7.0.3 ... okay - I'll try experimental one. Thanks.

Posted: 09.03.2013, 10:35
by simonbosti
I've downloaded 7.1 and latest revision 2204 - as far works good :)

Posted: 09.03.2013, 13:38
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