[Devel] SF.net SVN: openser: [2310] trunk/db/schema/pr_xcap_xml.xml

Klaus Darilion klaus.mailinglists at pernau.at
Wed May 30 13:30:56 CEST 2007



Henning Westerholt wrote:
> On Dienstag, 29. Mai 2007, you wrote:
>>     42     <column>
>>     43         <name>xcap</name>
>>     44         <type>text</type>
>>     45         <type db="postgres">bytea</type><!-- Bug 1684821 -->
>>     46         <description>xcap</description>
>>     47     </column>
>>
>> I think this is wrong. text should be fine. The problem is in the
>> presentity table (body column).
>>
>> presnece module stores body as DB_BLOB - thus bytea escaping is
>> performed. But when postgresql uses "text" for body column, the result
>> column is DB_STRING and unescaping is not performed. Thus,
>> presentity.body must be type bytea in postgresql.
> 
> Good morning Klaus,
> 
> ok, but why don't result this in errors for mysql too? And postgresql does 
> (String) escaping for STR and STRING.

The problem is that mysql treats TEXT as a blob type whereas postgresql 
treats TEXT as a string type. Thus, as presence module treats 
presentity.body as DB_BLOB, TEXT works in mysql but not in postgresql.

> I would like to stay with the current "database" datatypes, e.g. the variable 
> type "binary" is resolved to BLOB for mysql and bytea for postgresql.

Then let us use "binary" for presentity.body.

regards
klaus



More information about the Devel mailing list