From: Paul McGarry <paul@paulmcgarry.com>
To: ROS Didier <didier.ros@edf.fr>
Cc: pgsql-sql@lists.postgresql.org <pgsql-sql@lists.postgresql.org>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Why the index is not used ?
Date: Sun, 7 Oct 2018 13:20:53 +1100
Message-ID: <AFD3D125-FAED-42A8-B475-4A8FD568775B@paulmcgarry.com> (raw)
In-Reply-To: <dd1702f0a1b74ce79ca1e380ea4e63ee@PCYINTPEXMU001.NEOPROD.EDF.FR>
References: <dd1702f0a1b74ce79ca1e380ea4e63ee@PCYINTPEXMU001.NEOPROD.EDF.FR>
I haven’t looked up what pgp_sym_encrypt() does but assuming it does encryption the way you should be for credit card data then it will be using a random salt and the same input value won’t encrypt to the same output value so
====
WHERE cc=pgp_sym_encrypt('test value 32', 'motdepasse');
====
wouldn’t work because the value generated by the function when you are searching on isn’t the same value as when you stored it.
Paul
> On 6 Oct 2018, at 19:57, ROS Didier <didier.ros@edf.fr> wrote:
>
> WHERE cc=pgp_sym_encrypt('test value 32', 'motdepasse');
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: paul@paulmcgarry.com, didier.ros@edf.fr, pgsql-sql@lists.postgresql.org, pgsql-performance@lists.postgresql.org, pgsql-general@lists.postgresql.org
Subject: Re: Why the index is not used ?
In-Reply-To: <AFD3D125-FAED-42A8-B475-4A8FD568775B@paulmcgarry.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