Subject Re: [firebird-support] BLOB Filter
Author Dimitry Sibiryakov
Probably, we should move this discussion into firebird-devel or
firebird-architect. I'm cross-posting this message.

On 31 May 2004 at 14:49, Ivan Prenosil wrote:

>In EmbeddedSQL or in FB API you can request invoking
>blob filter by specifying both FROM and TO sub_types.
>The CAST syntax allows to specify only one sub_type,
>that is why I do not like such solution.

So, you prefer crash that you described below?

>IMHO blob's sub_type specified in column definition
>is just recommendation (exactly as blob's segment size).

IMHO, it is a design flaw. Server must enforce type of stored data.
I don't want to guess what Jim was thinking about, designing BLOB
filtering (if it was him).

>> As you can't store string
>> into integer field, you can't store different subtype of BLOB.
>Are you sure ?

I know that currently it is not true. Engine don't care about type
of BLOB at all.

>So what do you think will happen when you have blob column
>defined with sub_type -1, and when reading it you will request
>to use blob filter from -2 to -3 sub_type (which is allowed in

Big badaboom. And you still insist on specifying both FROM/TO

>> Yes, I think that creating
>> temporary BLOB is a proper way to go.
>Why not, if it will be properly documented.

Especially if this temporary BLOB to be created in memory or
temporary space.

>Currently coercion works for sqltypes only, not for sqlsubtypes.

This is result of not enforcing subtype. Engine isn't sure what
data is stored in BLOB and don't take responsibility of converting

>It is not possible to use coercion mechanism to request
>transliteration of field's charset (that is stored as subtype in

And you can provide any good reason for this inability?

SY, Dimitry Sibiryakov.