Re: ORDER/GROUP BY expression not found in targetlist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Seltenreich <seltenreich(at)gmx(dot)de>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ORDER/GROUP BY expression not found in targetlist
Date: 2016-05-26 14:12:55
Message-ID: 26822.1464271975@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Seltenreich <seltenreich(at)gmx(dot)de> writes:
> Peter Geoghegan writes:
>> It's surprising that SQL Smith didn't catch something with such simple
>> steps to reproduce.

> I removed distinct relatively early because it causes a large part of
> queries to fail due to it not finding an equality operator it likes. It
> seems to be more picky about the equality operator than, say, joins.
> I'm sure it has a good reason to do so?

It's looking for an operator that is known to be semantically equality,
by virtue of being the equality member of a btree or hash opclass.
Type path has no such opclass unfortunately. But when you write "a = b"
that just looks for an operator named "=".

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Shaplov 2016-05-26 14:31:08 Re: [PATCH][Documination] Add optional USING keyword before opclass name in INSERT statemet
Previous Message Andreas Seltenreich 2016-05-26 14:07:59 Re: ORDER/GROUP BY expression not found in targetlist