Subject Re: [Firebird-Architect] Re: [firebird-support] BLOB Filter
Author Ann W. Harrison
At 02:31 AM 6/1/2004, Dimitry Sibiryakov wrote:

> >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).

The blob subtype is not just a suggestion. Look at the use of
subtypes in the system tables. Each type of object (ACL, BLR,
format, etc.) has a subtype and uses it. However, it is possible
to specify the subtype on an instance by instance basis, and get
the subtype from the blob info call.

Users are responsible for keeping their subtypes consistent
because the engine doesn't, and shouldn't know the difference
between a png and a jpg.

> >> 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.

The engine cares a lot about the subtypes of system table blobs,
which are the ones it should care about. However, there is no way
(to my knowledge) to teach the engine about the legal formats of
images, postscript files, etc.


> >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
>subtypes?

Are you sure? I thought it returned saying there was no filter?


Regards,

Ann
www.ibphoenix.com
We have answers.