pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: howardnews@selestial.com
To: Pgsql General <pgsql-general@lists.postgresql.org>
Subject: Playing with pgcrypto
Date: Mon, 10 Oct 2022 23:25:20 +0100
Message-ID: <21bd2e636ddba3214539cf26243d6708@selestial.com> (raw)

Hi all,

I am trying out a few pgcrypto functions. I was expecting the final 
select statement to return the row I just inserted - Can anyone tell me 
what I am not understanding here?

create table test (p1 bytea);
insert into test (pgp_sym_encrypt('123', 'secret'));
select * from test where pgp_sym_encrypt('123', 'secret') = p1;

Thanks.

Howard





view thread (3+ messages)  latest in thread

Message-ID: <21bd2e636ddba3214539cf26243d6708@selestial.com>
Permalink:  ../21bd2e636ddba3214539cf26243d6708@selestial.com/
Also on:    postgresql.org/message-id/21bd2e636ddba3214539cf26243d6708@selestial.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: howardnews@selestial.com
  Subject: Re: Playing with pgcrypto
  In-Reply-To: <21bd2e636ddba3214539cf26243d6708@selestial.com>
  References: <21bd2e636ddba3214539cf26243d6708@selestial.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox