[sr-dev] [kamailio/kamailio] DB Postgres BLOB conversion for presence (#1255)
sergey-safarov
notifications at github.com
Wed Oct 10 10:45:08 CEST 2018
I tested this patch all. Now issue is fixed.
Also exist other way to fix this. Need to use
```
SELECT convert_from(body,'UTF-8') FROM presentity;
```
in SQL request to PostgreSQL server instreat of
```
SELECT body FROM presentity;
```
Example
```
pg1:~$ psql kamailio
psql (9.6.3)
Type "help" for help.
kamailio=# CREATE TABLE blob_table (blob bytea);
CREATE TABLE
kamailio=# INSERT INTO blob_table VALUES ('Kamailio');
INSERT 0 1
kamailio=# SELECT blob, convert_from(blob,'UTF-8') FROM blob_table;
blob | convert_from
--------------------+--------------
\x4b616d61696c696f | Kamailio
(1 row)
```
Second way is more elegant but i do not know hot to need change source code.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1255#issuecomment-428489293
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181010/e01c5fa5/attachment.html>
More information about the sr-dev
mailing list