Re: Why the index is not used ?

From: Paul McGarry <paul(at)paulmcgarry(dot)com>
To: ROS Didier <didier(dot)ros(at)edf(dot)fr>
Cc: "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Why the index is not used ?
Date: 2018-10-07 02:20:53
Message-ID: AFD3D125-FAED-42A8-B475-4A8FD568775B@paulmcgarry.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance pgsql-sql

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(dot)ros(at)edf(dot)fr> wrote:
>
> WHERE cc=pgp_sym_encrypt('test value 32', 'motdepasse');

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Gierth 2018-10-07 02:52:25 Re: Text-indexing UTF-8 bytea, convert_from() immutability, null bytes...
Previous Message Phil Endecott 2018-10-06 21:56:15 Text-indexing UTF-8 bytea, convert_from() immutability, null bytes...

Browse pgsql-performance by date

  From Date Subject
Next Message ROS Didier 2018-10-07 13:13:24 RE: Why the index is not used ?
Previous Message Vladimir Ryabtsev 2018-10-06 16:51:24 Re: Why the index is not used ?

Browse pgsql-sql by date

  From Date Subject
Next Message ROS Didier 2018-10-07 13:13:24 RE: Why the index is not used ?
Previous Message Vladimir Ryabtsev 2018-10-06 16:51:24 Re: Why the index is not used ?