Re: Why the index is not used ?

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: ROS Didier <didier(dot)ros(at)edf(dot)fr>
Cc: "pavel(dot)stehule(at)gmail(dot)com" <pavel(dot)stehule(at)gmail(dot)com>, "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 15:58:29
Message-ID: CA+bJJbxJuM4RQ=qMwQOF4Gep+y4w6a0Ym_ta7e_NBZH0p1sC2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance pgsql-sql

ROS:

On Sun, Oct 7, 2018 at 3:13 PM, ROS Didier <didier(dot)ros(at)edf(dot)fr> wrote:
....
> - INSERT INTO cartedecredit(username,cc) SELECT 'individu ' || x.id, pgp_sym_encrypt('test value ' || x.id, 'motdepasse','compress-algo=2, cipher-algo=aes256') FROM generate_series(1,100000) AS x(id);
> - CREATE INDEX idx_cartedecredit_cc02 ON cartedecredit(pgp_sym_decrypt(cc, 'motdepasse','compress-algo=2, cipher-algo=aes256'));

If my french is not too rusty you are encrypting a credit-card, and
then storing an UNENCRYPTED copy in the index. So, getting it from the
server is trivial for anyone with filesystem access.

Francisco Olarte.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ROS Didier 2018-10-07 18:32:38 RE: Why the index is not used ?
Previous Message ROS Didier 2018-10-07 13:20:02 RE: Why the index is not used ?

Browse pgsql-performance by date

  From Date Subject
Next Message ROS Didier 2018-10-07 18:32:38 RE: Why the index is not used ?
Previous Message ROS Didier 2018-10-07 13:20:02 RE: Why the index is not used ?

Browse pgsql-sql by date

  From Date Subject
Next Message ROS Didier 2018-10-07 18:32:38 RE: Why the index is not used ?
Previous Message ROS Didier 2018-10-07 13:20:02 RE: Why the index is not used ?