pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: suresh.arsenal29@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15795: ERROR: could not find pathkey item to sort
Date: Wed, 08 May 2019 06:33:18 -0400
Message-ID: <18171.1557311598@sss.pgh.pa.us> (raw)
In-Reply-To: <15795-fadb56c8e44ee73c@postgresql.org>
References: <15795-fadb56c8e44ee73c@postgresql.org>

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





view thread (7+ messages)  latest in thread

Message-ID: <18171.1557311598@sss.pgh.pa.us>
Permalink:  ../18171.1557311598@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18171.1557311598@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, suresh.arsenal29@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #15795: ERROR: could not find pathkey item to sort
  In-Reply-To: <18171.1557311598@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox