<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=windows-1252"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
According information I found in the PostgreSQL manual, the data type
"BYTEA" is already representing a postgres-like binary data format.<br>
<br>
Excerpt of the documentation
(<a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/8.3/static/datatype-binary.html">http://www.postgresql.org/docs/8.3/static/datatype-binary.html</a>):<br>
"The <tt class="TYPE">bytea</tt> data type allows storage of binary
strings. [...] The <acronym class="ACRONYM">SQL</acronym> standard
defines a different binary string type, called <tt class="TYPE">BLOB</tt>
or <tt class="TYPE">BINARY LARGE OBJECT</tt>. The input format is
different from <tt class="TYPE">bytea</tt>, but the provided functions
and operators are mostly the same."<br>
<br>
"Real" BLOB (according SQL definition) is therefore not supported by
postgres. This page (documentation of binary data types) includes
examples of literal escaped octets, too. Maybe is is helpful for
developers.<br>
<br>
Klaus<br>
<br>
Am 23.06.2010 18:05, schrieb Klaus Darilion:
<blockquote cite="mid:4C2230DC.2090100@pernau.at" type="cite"><br>
  <br>
Am 20.06.2010 14:39, schrieb Klaus Feichtinger:
  <br>
  <blockquote type="cite">4) I don’t know if the parser might be
influenced by a WARNING that is
    <br>
generated by the postgresql daemon whenever an entry into the
presentity
    <br>
table is done (including XML body). From Kamailio log output I saw that
    <br>
the special characters “#011” and “#012” are included in the XML body.
I
    <br>
guess that is the octal notation of \t (horizontal tab) and \n
(newline).
    <br>
    <br>
However, postgresql generates an error message that looks like
following:
    <br>
    <br>
/WARNING:  nonstandard use of \\ in a string literal at character 162/
    <br>
    <br>
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
    <br>
    <br>
Maybe this has some influence on the parser problem, too. Because in
    <br>
this version of Postgresql the parameter “standard_conforming_strings”
    <br>
is implicitly on – just for previous versions it could be set to off.
    <br>
That means, that any backslash symbol (\) is interpreted as standard
    <br>
character (no escape). Therefore the queried result of the database
does
    <br>
no longer include \n and \t.
    <br>
  </blockquote>
  <br>
I just wonder if this can be solved by storing the body as BLOB instead
of strings. Could you test using a BLOB for the body (in database and
presence modules)
  <br>
  <br>
regards
  <br>
klaus
  <br>
  <br>
</blockquote>
<br>
</body>
</html>