Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants

Поиск
Список
Период
Сортировка
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> +     root->parse->rtable = list_union(root->parse->rtable, subquery->rtable);

That's one heck of a scary patch: nowhere in list_union's API is there
any guarantee that it preserves list ordering, but we *must not* change
the positions of the existing rtable entries.

I think it might be better to fix the problem in
pull_up_union_leaf_queries instead; given that it wasn't broken till
recently, I think it's arguably that function's fault.  Can we redesign
it to pull up everything in the subquery rtable, not just what was
referenced?

            regards, tom lane

В списке pgsql-bugs по дате отправления: