[Devel] presence tables inconsistent

Klaus Darilion klaus.mailinglists at pernau.at
Wed Mar 28 13:15:47 CEST 2007


Hi!

I've dug in a little bit and foudn out, that the problem is related with 
the column type returned from the database:

postgresql:

Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[str2val]: Converting 
STRING [<?xml version='1.0' encoding='UTF-8'?><presence 
xmlns='urn:ietf:params:xml:ns:pidf' 
xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' 
xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' 
xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' 
entity='sip:klaus at pernau.at'><tuple 
id='tce39da66'><status><basic>open</basic></status></tuple><dm:person 
id='pc331fb2a'><rpid:activities><rpid:busy/></rpid:activities><dm:note>bin 
angfressn</dm:note></dm:person></presence>]
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[convert_row]: col[1]
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[str2val]: Converting 
INT [1175079819]
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[convert_row]: col[2]
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[str2val]: Converting 
STRING [a.1175076129.22555.1]
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[convert_rows]: 
[0][1] Col[expires] Type[0] Freeing row_buf[0x814f5b8]
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[convert_rows]: 
0x814f5b8=pkg_free() row_buf[1]
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[convert_rows]: 
0x814f3a8=pkg_free() row_buf
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PG[free_query]: 
PQclear(0x824dcd8) result set
Mar 28 12:03:39 ds3000 /usr/sbin/openser[22560]: PRESENCE:agregate_xmls: 
ERROR while parsing xml body message



Mysql (I added some log statements)
Mar 28 13:02:32 ds3000 /usr/sbin/openser[24334]: MY[str2val]: Converting 
BLOB [<?xml version='1.0' encoding='UTF-8'?><presence 
xmlns='urn:ietf:params:xml:ns:pidf' 
xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' 
xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' 
xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' 
entity='sip:klaus at pernau.at'><tuple 
id='t5415d91e'><status><basic>open</basic></status></tuple><dm:person 
id='p7160ae47'><rpid:activities><rpid:unknown/></rpid:activities></dm:person></presence>]
Mar 28 13:02:32 ds3000 /usr/sbin/openser[24334]: MY[str2val]: Converting 
INT [1175083352]
Mar 28 13:02:32 ds3000 /usr/sbin/openser[24334]: MY[str2val]: Converting 
STRING [a.1175078329.23624.21]
Mar 28 13:02:32 ds3000 /usr/sbin/openser[24334]: PRESENCE:notify:dialog 
informations:


Thus, "text" is returned from postgres as DB_STRING and from mysql as 
DB_BLOB. Thus, the question is: Why is the DB_STRING from postgres not 
accepted? By changing text to bytea in postgres the column type is also 
DB_BLOB and presence works fine.

The question: Should we evaluate why DB_STRING column type can be 
processed by presence module or just use bytea in postgres as workaround?

regards
klaus

Klaus Darilion wrote:
> Hi!
> 
> There are 2 tables/columns where XML content is stored. These use 
> different column types:
> 
>                 |  postgres  |   mysql
> ----------------+------------+------------
> presentity.body |   bytea    |   text
> xcap_xml.xcap   |   text     |   text
> 
> I wonder why we use bytea in postgresql only in presentity table. If 
> there is a problem with text in presentity table, but not in xcap_xml 
> table then I guess the problem is not the column type but somewhere else.
> 
> IMO we should try to be more consistent.
> 
> regards
> klaus
> 
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel



More information about the Devel mailing list