Convert from hex to string

From: Yuriy Rusinov <yrusinov(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Convert from hex to string
Date: 2015-11-25 15:47:06
Message-ID: CAA5U4syE1YdKFaWCv=95D3v9Zyz=T8yitQp3MaaC8smDMTD-Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello, Colleagues !

I have to transform string, encoded to hexadecimal to text, but if I try to
select encode('Qt is great!', 'hex'); I receive valid and correct results

517420697320677265617421

but if I try to select decode ('517420697320677265617421', 'hex'), I
receive the same string, such as
'\x517420697320677265617421, which way I have to do for valid convert
to/from hexadecimal ?

Thanks for attention.
--
Best regards,
Sincerely yours,
Yuriy Rusinov.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-11-25 16:26:06 Re: Convert from hex to string
Previous Message Ramesh T 2015-11-25 15:46:35 Re: Taking lot time