BUG #2820: "select" faling with "distinct" clause on a subquery

From: "trinchero" <trinchero(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2820: "select" faling with "distinct" clause on a subquery
Date: 2006-12-09 17:01:00
Message-ID: 200612091701.kB9H10OF042291@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2820
Logged by: trinchero
Email address: trinchero(at)gmail(dot)com
PostgreSQL version: 8.2
Operating system: Windows XP
Description: "select" faling with "distinct" clause on a subquery
Details:

To reproduce:

1. create tables:

CREATE TABLE u_listino
(
u_listino_id numeric(10) NOT NULL,
u_tipolis_id numeric(10) NOT NULL
)
WITH OIDS;

CREATE TABLE u_tipolis
(
u_tipolis_id numeric(10) NOT NULL
)
WITH OIDS;

2. run the query:

SELECT U_Listino.U_LISTINO_ID FROM U_Listino
WHERE U_Listino.U_TIPOLIS_ID IN (SELECT DISTINCT U_TipoLis.U_TIPOLIS_ID
FROM U_TipoLis);

This give error:
could not find pathkey item to sort
sql state: XX000

Problem seen in a java application, and replicated using pg admin 3
(distributed with PostgresSQL 8.2)

If the same query is run without the DISTINCT, it gives no error.

Best regars.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Edwin Groothuis 2006-12-09 23:44:09 xid cannot be casted to a different type
Previous Message Albert Strasheim 2006-12-09 15:44:51 Re: BUG #2802: Feature request: tinyint and unsigned types