[OpenSER-Devel] TEXT vs BLOB data in database modules
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Mon Apr 21 12:41:54 CEST 2008
Hi Henning,
maybe there is no need for TEXT, but for sure you need some escaping for
BLOB type - I remember this issue some time ago in the the postgres module.
Regards,
Bogdan
Henning Westerholt wrote:
> On Sunday 20 April 2008, Bogdan-Andrei Iancu wrote:
>
>> I think option 2 will be better, mainly because we have 2 different data
>> types - BLOB cannot be 100% mapped over string as BLOB was specifically
>> design for:
>> 1) large amount of data (not suitable for STRING)
>> 2) data containing any kind of chars/bytes (not suitable for
>> STRING, like \0)
>>
>> For BLOB processing, most of the database libs provide specific function
>> to escape, un-escape data when comes to BLOB, and such code already
>> exists in openser.
>>
>> Also, this will maintain some consistency at the data level and avoid
>> mixing them (and create confusion).
>>
>
> Hi Bogdan,
>
> according to http://dev.mysql.com/doc/refman/5.0/en/blob.html TEXT colums are
> treated as non-binary strings, so its not allowed to store binary data in
> them. So the usage of the specific escaping functions is not really
> necessary. But the length argument is valid anyway.
>
> So i'll convert the db_unixodbc and db_postgres drivers to use this logic.
>
> Cheers,
>
> Henning
>
>
More information about the Devel
mailing list