[fpc-pascal] [PATCH] Add Oid_JSON in pqconnection unit

Michael Van Canneyt michael at freepascal.org
Thu Mar 5 10:25:49 CET 2015

On Wed, 4 Mar 2015, silvioprog wrote:

> Hello,
> The patch allows to use this ... :
>     select row_to_json(row(1,'foo'))
> ... instead of this (in this case, the ::text cast avoids the "Missing (compatible) underlying dataset, can not open" error):

I think you better cast it to ftMemo instead of ftString.

The contents of string fields are limited to 8k in fcl-db.
A lot of JSON will be bigger than that.

Since MyDataset.FieldByName('Mymemofield').AsString works as you would expect, there no reason to use string instead of memo fields.

The use of stringlist in jsonscanner is about to be removed, because it adversely affects performance.


More information about the fpc-pascal mailing list