agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: ROS Didier <didier.ros@edf.fr>
To: paul@paulmcgarry.com <paul@paulmcgarry.com>
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:02 +0000
Message-ID: <cdf0c771d39d4eecaa13b4e8d11d1633@PCYINTPEXMU001.NEOPROD.EDF.FR> (raw)
In-Reply-To: <AFD3D125-FAED-42A8-B475-4A8FD568775B@paulmcgarry.com>
References: <dd1702f0a1b74ce79ca1e380ea4e63ee@PCYINTPEXMU001.NEOPROD.EDF.FR>
<AFD3D125-FAED-42A8-B475-4A8FD568775B@paulmcgarry.com>
Hi Paul
Thanks for the explanation. I think you are right.
I understand why the WHERE clause “cc=pgp_sym_encrypt('test value 32', 'motdepasse');” does not bring anything back.
Best Regards
Didier ROS
De : paul@paulmcgarry.com [mailto:paul@paulmcgarry.com]
Envoyé : dimanche 7 octobre 2018 04:21
À : ROS Didier <didier.ros@edf.fr>
Cc : pgsql-sql@lists.postgresql.org; pgsql-performance@lists.postgresql.org; pgsql-general@lists.postgresql.org
Objet : Re: Why the index is not used ?
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<mailto:didier.ros@edf.fr>> wrote:
WHERE cc=pgp_sym_encrypt('test value 32', 'motdepasse');
Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.
Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
E-mail communication cannot be guaranteed to be timely secure, error or virus-free.
view thread (25+ messages) latest in thread
Message-ID: <cdf0c771d39d4eecaa13b4e8d11d1633@PCYINTPEXMU001.NEOPROD.EDF.FR>
Permalink: ../cdf0c771d39d4eecaa13b4e8d11d1633@PCYINTPEXMU001.NEOPROD.EDF.FR/
Also on: postgresql.org/message-id/cdf0c771d39d4eecaa13b4e8d11d1633@PCYINTPEXMU001.NEOPROD.EDF.FR
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: didier.ros@edf.fr, paul@paulmcgarry.com, 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: <cdf0c771d39d4eecaa13b4e8d11d1633@PCYINTPEXMU001.NEOPROD.EDF.FR>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox