BUG #1171: select distinct 'value',... fails.

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1171: select distinct 'value',... fails.
Дата
Msg-id 20040617145443.240E8CF5493@www.postgresql.com
обсуждение исходный текст
Ответы Re: BUG #1171: select distinct 'value',... fails.
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1171
Logged by:          Harro Lock

Email address:      harro1@dataleaf.nl

PostgreSQL version: 7.4

Operating system:   Linux

Description:        select distinct 'value',... fails.

Details:

'select distinct' fails when using a string value in the columnlist.

Here is a minimal query that reproduces the bug:

    select distinct 'value';

This should give "value" as a result, but it produces this error-message:

ERROR:  Unable to identify an ordering operator '<' for type '"unknown"'
        Use an explicit ordering operator or modify the query


A work-around for this bug is to cast the string to a known type:

    select distinct cast('value' as varchar);

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: BUG #1168: JDBC compile fails using Java 1.5.0-beta2