I know that BLOBs are on the TODO list, but I had an idea.

I think the storage of a BLOB outside of the table is an elegant 
solution and keeps table sizes down without the bloat of the stored 
object.   Granted, if you are searching with a regular expression or 
using like or ilike clauses, you're likely to be a little slower but it 
shouldn't be by much.  More than likely, you won't be searching for 
patterns in the BLOB but rather the fields in the table associated with 
the BLOB.

Wouldn't it be wonderful if you used the methods you had already 
implemented and instead create a behavoir similar to the following.

on an insert
    take the data that was to be the blob...
    create your externally "to be referenced" file
    save the data to the file
    store the reference to that file

on an update
    take the data that was to be the blob...
    create your externally "to be referenced" file
    save the data to the file
    store the reference to that file
    delete the old referenced file

on a delete
    delete the reference to your file
    delete the external file

I was thinking that the BLOB column type might be a trigger for a macro 
that could handle the lo_import, lo_export juggling...

I know it seems overly simplified, but having fought with MySQL and then 
trying to wrestle with postgresql and importing,exporting BLOBs, it 
seemed there might be a little more room for discussion, although I 
doubt this may have added anything to it...

I'd love to see something done with BLOB support during 7.2.x *hint* :)

Besides, if someone could give me some pointers as to where I might be 
able to start, I might try to contribute something myself.

Thomas



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to