Lists: | Postg사설 토토 사이트SQL : Postg사설 토토 사이트SQL 메일 링리스트 : 2022-09-08 이후 PGSQL-BUGS 05:12 |
---|
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 |
Lists: | Postg사설 토토 사이트SQL : Postg사설 토토 사이트SQL 메일 링리스트 : 2022-09-08 이후 PGSQL-BUGS 05:12 |
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.
From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | qiumingcheng <qiumingcheng(at)aliyun(dot)com> |
Cc: | pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>, qiumingcheng <qiumingcheng(at)huawei(dot)com> |
Subject: | A problem about LEAKPROOF of postgresql |
Date: | 2022-09-08 06:04:45 |
Message-ID: | CAKFQuwY5wQZkf-U_YG5RD_o=Zsf-rkLSabHBqKpnLc090QfUXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On Wednesday, September 7, 2022, qiumingcheng <qiumingcheng(at)aliyun(dot)com>
wrote:
>
> Please help to answer: in the optimizer stage, if I remove the code in
> the red box below, what will be the problem。
>
>
Please do not direct general inquiries to the bug reporting mailing list.
We have the -general mailing list for that.
Please consult the documentation for leakproof.
/docs/current/sql-createfunction.html
Removing said code will constitute a data leak vector as the subsequent
debug message says. The planner doesn’t get to apply other filters at this
step so the data being fed to the function is assumed to contain data the
user is not allowed to see and thus must not be leaked from the system.
David J.