Postgeressql varchar field size problem.

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
tygrys
Junior Boarder
Junior Boarder
Posts: 33
Joined: 09.12.2005, 18:31
Location: Poland

Postgeressql varchar field size problem.

Post 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.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post 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.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
tygrys
Junior Boarder
Junior Boarder
Posts: 33
Joined: 09.12.2005, 18:31
Location: Poland

Post by tygrys »

Thanks.

I'll check how it works.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

tygrys,

does it work like expected?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply