Subject Re: [firebird-support] BLOB Filter
Author Ivan Prenosil
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.
IMHO blob's sub_type specified in column definition
is just recommendation (exactly as blob's segment size).

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

Are you sure ?
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) ?


> Yes, I think that creating
> temporary BLOB is a proper way to go.

Why not, if it will be properly documented.
(With the note that temporary blob is unnecessary if blob
filtering is requested as part of creating/opening the blob.)

> It must be done at the same
> level when coercion of datatypes is performed. I don't see
> distinction in kind between setting different sqltype in XSQLVAR and
> setting different sqlsubtype. If I request a field to be delivered as
> SQL_TEXT, FB obey. It must do the same for BLOB subtypes.

Currently coercion works for sqltypes only, not for sqlsubtypes.
It is not possible to use coercion mechanism to request
transliteration of field's charset (that is stored as subtype in xsqlvar).

Ivan



----- Original Message -----
From: "Dimitry Sibiryakov" <SD@...>
To: <firebird-support@yahoogroups.com>
Sent: Monday, May 31, 2004 8:36 AM
Subject: Re: [firebird-support] BLOB Filter


> On 28 May 2004 at 14:19, Ivan Prenosil wrote:
>
> >> Talking about syntax, why not just CAST(MyBlob AS BLOB SUB_TYPE
> >> 1)?
> >
> >Although column's default sub_type can be used,
> >the syntax should allow specifying both sub_types (FROM/TO).
>
> Any reason? Rephrase your statement a bit and you'll get "Although
> column's default type can be used, the /CAST/ syntax should allow
> specifying both types" that is nonsence. As you can't store string
> into integer field, you can't store different subtype of BLOB.
> And answerring another your message: Yes, I think that creating
> temporary BLOB is a proper way to go. It must be done at the same
> level when coercion of datatypes is performed. I don't see
> distinction in kind between setting different sqltype in XSQLVAR and
> setting different sqlsubtype. If I request a field to be delivered as
> SQL_TEXT, FB obey. It must do the same for BLOB subtypes.
>
> SY, Dimitry Sibiryakov.
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>