Re: Views no longer in rangeTabls?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Views no longer in rangeTabls?
Дата
Msg-id 625519.1686401807@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Views no longer in rangeTabls?  (David Steele <david@pgmasters.net>)
Ответы Re: Views no longer in rangeTabls?  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
David Steele <david@pgmasters.net> writes:
> On 6/10/23 09:57, Amit Langote wrote:
>> I too have been thinking that setting relkind might be a good idea, even 
>> if only as a crosscheck that only view relations can look like that in 
>> the range table.

> +1. Even better if we can do it for PG16.

Well, if we're gonna do it we should do it for v16, rather than
change the data structure twice.  It wouldn't be hard exactly:

    /*
     * Clear fields that should not be set in a subquery RTE.  Note that we
     * leave the relid, rellockmode, and perminfoindex fields set, so that the
     * view relation can be appropriately locked before execution and its
     * permissions checked.
     */
-   rte->relkind = 0;
    rte->tablesample = NULL;
    rte->inh = false;            /* must not be set for a subquery */

plus adjustment of that comment and probably also the comment
for struct RangeTblEntry.

            regards, tom lane



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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Let's make PostgreSQL multi-threaded
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Views no longer in rangeTabls?