Re: Get the name of the target Relation from Query struct? SOLVED!

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: Get the name of the target Relation from Query struct? SOLVED!
Дата
Msg-id CAFjFpRenvB8i6NfiC8M6VXOy74rD528n-iAvCUUH1t-kGMbU1w@mail.gmail.com
обсуждение исходный текст
Ответ на AW: Get the name of the target Relation from Query struct? SOLVED!  (Ernst-Georg Schmid <ernst-georg.schmid@bayer.com>)
Ответы AW: Get the name of the target Relation from Query struct? SOLVED!  (Ernst-Georg Schmid <ernst-georg.schmid@bayer.com>)
Список pgsql-hackers
Please don't break threads by changing subject line.

On Fri, Apr 6, 2018 at 3:42 PM, Ernst-Georg Schmid
<ernst-georg.schmid@bayer.com> wrote:
> Hello David,
>
> actually Query->resultRelation is one based and Query->rtable is zero based.
>
> So the correct call to list_nth is: list_nth(Query->rtable, Query->resultRelation - 1)

As I suggested in the other mail, please use rt_fetch() or
planner_rt_fetch() that's future-proof in case we change relids to be
something-other-than-one based (an unlikely event, but who knows).
-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Vacuum: allow usage of more than 1GB of work mem
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Vacuum: allow usage of more than 1GB of work mem