|Subject||Re: [Firebird-Architect] Re: [firebird-support] BLOB Filter|
> From: "Dimitry Sibiryakov" <SD@...>I did not described or experienced any crash regarding using blob filters.
> 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?
And you ?
>I do not see any reason why to enforce such arbitrary limitations.
> >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).
What if I want to store any type of file in blob field, and be able
to call different blob filters (e.g. to convert jpg->png, jpg->bmp, jpg->tif,
wav->mp3, compress/decompress any file, encrypt/decrypt any file, etc.)
With your proposal I would have to create special column
for every possible blob sub-type. Absurd.
In the past people already asked whether they can store blobs
of different subtypes in single blob column.
>You are mixing types and subtypes.
> >> As you can't store string
> >> into integer field, you can't store different subtype of BLOB.
And if I want, I can store strings of different subtypes (i.e. charsets)
into none-charset column.
> >No badaboom here. But even if there is some bug, why not just fix it
> >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
> >ESQL or FBAPI) ?
> Big badaboom. And you still insist on specifying both FROM/TO
instead of introducing some restrictions ?
>Is not blob usually defined as type that contains data server does not care about?
> >> 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
>I would prefer if it was possible, but currently it is not
> >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?
(because of the way how connection charset is implemented).
Also, IIRC, Jim said that original architecture allowed blob filters
to reside anywhere between client and server (i.e. not necessarily
on server machine). It is apperently not possible anymore,
but if this functionality was restored, creating auxiliary blobs
could cause unnecessary ping-pong of blob data between machines.
> SY, Dimitry Sibiryakov.