Re: ERROR: ORDER/GROUP BY expression not found in targetlist - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ERROR: ORDER/GROUP BY expression not found in targetlist
Date
Msg-id 20180.1529510397@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: ORDER/GROUP BY expression not found in targetlist  (Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>)
Responses Re: ERROR: ORDER/GROUP BY expression not found in targetlist
List pgsql-hackers
Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.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


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: PATCH: backtraces for error messages
Next
From: Andres Freund
Date:
Subject: line numbers in error messages are off wrt debuggers