On Fri, Apr 6, 2018 at 2:08 PM, Ernst-Georg Schmid
<ernst-georg(dot)schmid(at)bayer(dot)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