Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint

Поиск
Список
Период
Сортировка
Искать
От
Greg Stark
Тема
Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint
Дата
в 23:05:05
Msg-id
CAM-w4HM6KWQzM2mob+q92qS8ASFp9MyPVfaG-CcEionPvitQFQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint Tom Lane <tgl@sss.pgh.pa.us>
Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint Greg Stark <stark@mit.edu>
Re: Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint Andres Freund <andres@2ndquadrant.com>
Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint Tom Lane <tgl@sss.pgh.pa.us>
Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint Andres Freund <andres@2ndquadrant.com>
Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint Tom Lane <tgl@sss.pgh.pa.us>
On Tue, May 7, 2013 at 6:59 PM, Tom Lane  wrote:
> The main downside of this
> is that fully dummy appendrels (those with no live children at all,
> such as in your example) wouldn't be recognized by IS_DUMMY_PATH,
> so the quality of planning in the outer query would be slightly
> degraded.  But such cases are probably sufficiently unusual that this
> might be an okay price to pay for a back branch

That's kind of dismaying. ORMs have a tendency to create queries like
this and people may have even written such queries by hand and tested
them to determine that postgres was able to exclude the useless
relation. To have them install a security update and discover that
something they had previously tested no longer worked would be
annoying.

If we just reverted your fix and didn't fix it in 9.2 that would also
fix the crash right? The bug was only that it leaked the fact that the
view was provably empty from the definition? But it's been that way
for a long time and after all:

xxx=> select * from pg_views where viewname = 'v';schemaname | viewname | viewowner |   definition
------------+----------+-----------+----------------public     | v        | stark     |  SELECT 1     +           |          |           |   WHERE false;
(1 row)

-- 
greg


В списке pgsql-hackers по дате отправления
От: Robins Tharakan
Дата:
От: Robins Tharakan
Дата:
FAQ