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

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: Get the name of the target Relation from Query struct?
Дата
Msg-id CAFjFpRdqXiP4_bRsjAGG6S0frXw1r06-fs38DjU9F4vgCc29ug@mail.gmail.com
обсуждение исходный текст
Ответ на AW: Get the name of the target Relation from Query struct?  (Ernst-Georg Schmid <ernst-georg.schmid@bayer.com>)
Список pgsql-hackers
On Fri, Apr 6, 2018 at 2:08 PM, Ernst-Georg Schmid
<ernst-georg.schmid@bayer.com> wrote:

>
>     if(parse->commandType != CMD_SELECT) {
>         int resultRelation = parse->resultRelation;
>
>         rte = (RangeTblEntry *) list_nth(parse->rtable, resultRelation);
>

list_nth() assumes that the lists are 0 based. But relations indexes
are 1 based. Please use rt_fetch() or planner_rt_fetch() as suitable.



-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


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

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