Page 1 of 1

Postgeressql varchar field size problem.

Posted: 18.02.2013, 12:54
by tygrys
Postgresql allows to use character varying field type without field size limit, this allows storying a string with any length (max about 1GB chars).

Create Table test
(
testfield varchar
)

Now I use a query:
Select * from test

In this case Zeos creates a string field for 'testfield' and limits its size to 255 chars (or 512), which truncates the output. I can modify a source to increase the default, but it should be handled in some more elegant way - maybe as a parameter to the connection or query or so.

Posted: 18.02.2013, 14:51
by EgonHugeist
tygrys,

already done on 7.1 (SVN)

http://zeosbugs.firmos.at/view.php?id=229

use TZConnection.Properties.Values['Undefined_Varchar_AsString_Length=xxx'] to define your own fieldsize. On the other hand i assume Memo-Fields instead.

Posted: 19.02.2013, 06:31
by tygrys
Thanks.

I'll check how it works.

Posted: 22.02.2013, 14:08
by EgonHugeist
tygrys,

does it work like expected?