The following bug has been logged online:

Bug reference: 2820
Logged by: trinchero
Email address: [email protected]
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.

Search Discussions

  • Tom Lane at Dec 10, 2006 at 8:22 pm

    "trinchero" <[email protected]> writes:
    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
    This has already been reported and fixed, but thanks for letting us know!

    regards, tom lane

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-bugs @
categoriespostgresql
postedDec 9, '06 at 5:01p
activeDec 10, '06 at 8:22p
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Trinchero: 1 post Tom Lane: 1 post

People

Translate

site design / logo © 2023 Grokbase