Re: [general] Error while decrypting using pgp - Mailing list pgsql-general

From Jeff Janes
Subject Re: [general] Error while decrypting using pgp
Date
Msg-id CAMkU=1wEFfTwv-DwBeo9rVM3Vc_gDmjajvBPO-1kpr17Wyf9Vw@mail.gmail.com
Whole thread Raw
In response to [general] Error while decrypting using pgp  (VENKTESH GUTTEDAR <venkteshguttedar@gmail.com>)
List pgsql-general
On Wed, Nov 19, 2014 at 2:49 AM, VENKTESH GUTTEDAR <venkteshguttedar@gmail.com> 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

pgsql-general by date:

Previous
From: Jonathan Vanasco
Date:
Subject: Re: issue with double ordering in a wrapped distinct
Next
From: "Zuiderhoek, Jeroen"
Date:
Subject: Building debug version with MSVC 2013 for 64bit: No _d postfix on dll and lib files...