Subject Re: [firebird-support] Dynamic statement construction and BLOB variables in SP
Author Miroslav Penchev
On Mon, 24 Jul 2006 15:48:26 +0300, Helen Borrie <helebor@...>

>> You can't work with BLOBs in PSQL.
> That's not altogether true and it's not the cause of the problem here.
> from_part = 'VIEW_DOCUMENT_DATA';
> You can't assign a string to a blob.
> temp_str = 'SELECT * FROM ' || :from_part;
> You can't concatenate a blob to anything.

FB just try to validate the content of :from_part. It reports me different
kind of syntax errors about the content of :from_part. Anyway - I already
accepted that I should use VARCHARs :) .

> Why would you want to use a blob here anyway?

Because I want to compose a run-time SQL statement and I do not know the
size at all. Probably several KBytes will be enough. For now I made it
with VARCHARs(4K). I do not like sentence "large enough VARCHAR", because
there is no such thing. It is just one more limitation (probably no one
will ever reach it but ... ) of my system. Also I am not sure how FB store
local VARCHAR variables. Is 4-5 VARCHAR(4096) in one SP is some overhead?

> Did you know that it is also pointless to define a segment size for a
> blob?

Yes, but source is generated from IBExpert and I just copy/paste it here
:) .

Miroslav Penchev.