Subject Re: [firebird-support] Moving a Blob
Author Milan Babuskov
Stefan Heymann wrote:
> How can I move a Blob from one table to another without transferring
> it over the network?
>
> Is that possible?
>
> update table2
> set myblobfield =
> (select anotherblobfield from table1 where id=...)

This looks ok. Even if it would copy the blob (which I doubt it does) it
wouldn't have to go "over the network" but would be transferred locally
on the server.

> Will it create another instance of the blob or just copy the blob
> "pointer"? So if I overwrite the blob in table1 after that, will the
> blob in table2 also change or not?

I am not an expert on internals (so someone can correct me if I'm
wrong), but what I know from the docs is that only the blob "pointer"
gets copied. If you overwrite the blob, a new "pointer" is created for
that new data, so you don't have to worry as your row in table2 would
still have the old "pointer".


--
Milan Babuskov
http://www.guacosoft.com
http://www.flamerobin.org