Search Postgresql Archives

Re: [general] Error while decrypting using pgp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 19, 2014 at 2:49 AM, VENKTESH GUTTEDAR <venkteshguttedar@xxxxxxxxx> wrote:

    i am getting this error

    ERROR:  function pgp_sym_decrypt(character varying, text) does not exist
    LINE 1: SELECT pgp_sym_decrypt(phone_no, keys.privkey), pgp_sym_decrypt(us...

The encrypted message needs to be binary data, bytea.  You can cast it to bytea, like: 

pgp_sym_decrypt(phone_no::bytea, keys.privkey)

But really the column phone_no should be of type bytea to start with.

Cheers,

Jeff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux