Re: ERROR: ORDER/GROUP BY expression not found in targetlist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: ERROR: ORDER/GROUP BY expression not found in targetlist
Date: 2018-06-20 15:59:57
Message-ID: 20180.1529510397@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com> writes:
> Below test case is failing with ERROR: ORDER/GROUP BY expression not found
> in targetlist. this issue is reproducible from PGv10.

Thanks for the report. I traced through this, and the problem seems to
be that split_pathtarget_at_srfs() is neglecting to attach sortgroupref
labeling to the extra PathTargets it constructs. I don't remember
whether that code is my fault or Andres', but I'll take a look at
fixing it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-06-20 16:04:34 line numbers in error messages are off wrt debuggers
Previous Message Andres Freund 2018-06-20 15:58:28 Re: PATCH: backtraces for error messages