Subject | Re: [ib-support] How to detect BLOB changes in a Trigger |
---|---|
Author | Jason Chapman (JAC2) |
Post date | 2002-03-01T14:07:22Z |
To get round this, we put Blobs in their own tables, then if the row
updates, the Blob has probably been chnaged, therefore replicate. This is a
sledge hammer really as I think (someone correct me if I'm wrong), if a blob
is updated (even to the same value), the new.blob will have a different
BlobId to the old.blob, so as a quick, cheap (comparing Blob contents must
be expensive) enhancement to the engine we could have:
GetBlobIDFromField( Blob ) : BlobId, you could then
if GetBlobIdFromField( new.blob) <> GetBlobIdFromField( old.blob) then
put the flag in for replication.
When I finally get my finger out and build IB, I think this will be one of
the items on my list of to-do's.
JAC.
"Markus Ostenried" <chef_007@...> wrote in message
news:5.1.0.14.2.20020226144642.02021800@......
updates, the Blob has probably been chnaged, therefore replicate. This is a
sledge hammer really as I think (someone correct me if I'm wrong), if a blob
is updated (even to the same value), the new.blob will have a different
BlobId to the old.blob, so as a quick, cheap (comparing Blob contents must
be expensive) enhancement to the engine we could have:
GetBlobIDFromField( Blob ) : BlobId, you could then
if GetBlobIdFromField( new.blob) <> GetBlobIdFromField( old.blob) then
put the flag in for replication.
When I finally get my finger out and build IB, I think this will be one of
the items on my list of to-do's.
JAC.
"Markus Ostenried" <chef_007@...> wrote in message
news:5.1.0.14.2.20020226144642.02021800@......
> At 07:58 Tuesday, 26.02.2002 +0100, you wrote:
> >too bad.
> >do you know, if it's the same with firebird?
>
> Yes, AFAIK you can't compare BLOB fields with trigger language.
> not in firebird and not in interbase.
>
> bye,
> Markus
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>