[OpenSER-Devel] TEXT vs BLOB data in database modules
Henning Westerholt
henning.westerholt at 1und1.de
Mon Apr 21 10:57:50 CEST 2008
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