Re: BUG #15795: ERROR: could not find pathkey item to sort
От | Tom Lane |
---|---|
Тема | Re: BUG #15795: ERROR: could not find pathkey item to sort |
Дата | |
Msg-id | 18171.1557311598@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #15795: ERROR: could not find pathkey item to sort (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #15795: ERROR: could not find pathkey item to sort
|
Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes: > Here is query: > SELECT DISTINCT A._id0 as _id0, A._actual_type_name0 as _actual_type_name0 > FROM ( ( SELECT DISTINCT _id as _id0, _actual_type_name as > _actual_type_name0, name as name0 FROM hello_world.person ) union all ( > SELECT DISTINCT _id as _id0, _actual_type_name as _actual_type_name0, name > as name0 FROM hello_world.person)) as A WHERE ( A.name0 = A.name0 ); It's politer to provide a self-contained test case, rather than expect us to reverse-engineer details that might be critical. For the archives, though, this isn't hard to reproduce: regression=# create table person(_id int, _actual_type_name text, name text); CREATE TABLE regression=# SELECT DISTINCT A._id0 as _id0, A._actual_type_name0 as _actual_type_name0 FROM ( ( SELECT DISTINCT _id as _id0, _actual_type_name as _actual_type_name0, name as name0 FROM person ) union all ( SELECT DISTINCT _id as _id0, _actual_type_name as _actual_type_name0, name as name0 FROM person)) as A WHERE ( A.name0 = A.name0 ); ERROR: could not find pathkey item to sort Curiously, this only fails for me in 9.6 and 10, not earlier or later branches. regards, tom lane
В списке pgsql-bugs по дате отправления: