A problem about LEAKPROOF of postgresql

From: "qiumingcheng" <qiumingcheng(at)aliyun(dot)com>
To: "pgsql-bugs" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Cc: "qiumingcheng" <qiumingcheng(at)huawei(dot)com>
Subject: A problem about LEAKPROOF of postgresql
Date: 2022-09-08 05:12:03
Message-ID: 808534d4-e93e-47f8-ad87-a89dfc44ed17.qiumingcheng@aliyun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello, expert, please ask a question about the source code of PostgreSQL (branch where the code is located: Master, file where the code is located: selfuncs. C). The code is as follows:
According to my understanding, in the optimizer stage, the code in the red box below can be removed, otherwise it may affect the selection of the execution plan path of the film and television image:
A user a creates a view and authorizes the view to his user B (user B only has view permissions, but does not have table permissions corresponding to the view). When querying the view under user a,
you can see that the execution plan path will select the index path, but when user B implements the view, he will not select the index path. I know that it is a question about leakproof.
My reference link is as follows:https://www.2ndquadrant.com/en/blog/how-do-postgresql-security_barrier-views-work/ <https://www.2ndquadrant.com/en/blog/how-do-postgresql-security_barrier-views-work/ >
Please help to answer: in the optimizer stage, if I remove the code in the red box below, what will be the problem。
Thank you very much.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2022-09-08 06:04:45 A problem about LEAKPROOF of postgresql
Previous Message qiumingcheng 2022-09-08 05:04:25 A problem about LEAKPROOF of postgresql