Subject Re: [firebird-support] Performing LIKE queries on a BLOB
Author Ivan Prenosil

unfortunately, I can only confirm your findings.

1) LIKE operator looks only at first segment, and only at its first 1024 bytes.
Such limitations should be documented somewhere. (Helen ?)

(CONTAINING behaves much better, it found a word at the end of 10k blob,
even if it was split into two segments.)

2) I was not able to create streamed blob. I always end up with standard segmented blob.
(But since other parameters in BlobParameterBuffer works o.k. for me,
like specifying blob-filter or character set, I think I am not doing it completely wrong.)
Anybody else tried creating streamed blob ? I use this BPB:
isc_bpb_version1, isc_bpb_type, 1, isc_bpb_type_stream, etc...

It seems UDF is your only solution. (and it should not be much difficult to write one)

Ivan Prenosil

----- Original Message -----
From: "Robert DiFalco"
> After some experimentation it seems like using Stream Blobs makes no
> difference. In fact, regardless of segment size, etc. the string
> function will only work on ~1100 bytes inclusively. Seems like the only
> hope is finding some TEXT BLOB UDF library that I can run (or at least
> compile) on both Windows and Solaris. Unfortunately, I don't have time
> to write my own in C/C++.
> Cheers,
> R.
> -----Original Message-----
> From: Ivan Prenosil [mailto:Ivan.Prenosil@...]
> Sent: Sunday, October 05, 2003 5:33 PM
> To:
> Subject: Re: [firebird-support] Performing LIKE queries on a BLOB
> > Hmmmm...maybe one day when the crazy days of my current project have
> > ended I can take a look at the FB source. Seems like I should be able to
> > buffer all the data in segment by segment or use a streaming blob to
> > prevent the wild-card matching from failing when crossing segment
> > boundaries. For now, there really is no solution.
> There are several solutions. E.g.
> - Use UDF instead of LIKE operator
> - Use streamed blobs instead of segmented ones.