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

Поиск
Список
Период
Сортировка
От trinchero
Тема BUG #2820: "select" faling with "distinct" clause on a subquery
Дата
Msg-id 200612091701.kB9H10OF042291@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2820: "select" faling with "distinct" clause on a subquery  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2820
Logged by:          trinchero
Email address:      trinchero@gmail.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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Albert Strasheim
Дата:
Сообщение: Re: BUG #2802: Feature request: tinyint and unsigned types
Следующее
От: "Edwin Groothuis"
Дата:
Сообщение: BUG #2821: xid cannot be casted to a different type