dbTalk Databases Forums  

[BUGS] BUG #1171: select distinct 'value',... fails.

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1171: select distinct 'value',... fails. in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1171: select distinct 'value',... fails. - 06-17-2004 , 01:05 PM







The following bug has been logged online:

Bug reference: 1171
Logged by: Harro Lock

Email address: harro1 (AT) dataleaf (DOT) 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);



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1171: select distinct 'value',... fails. - 06-18-2004 , 11:26 AM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
select distinct 'value';
ERROR: Unable to identify an ordering operator '<' for type '"unknown"'
Use an explicit ordering operator or modify the query
This is accepted in 7.4 and later. You are evidently using something
older.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.