From: mcornell@spamcop.net
To: pgsql-sql@postgresql.org
Subject: DISCTINCT and literals - Unable to identify an ordering operator
Date: 7 Dec 2001 10:40:19 -0800
Message-ID: <e991097a.0112071040.70ed9077@posting.google.com> (raw)
Hi Folks,
We're new to postgres and we have a question. We're using 7.1.x on
Linux and we've had to change all of our code with "SELECT DISTINCT"
and character literals to work around what looks like an SQL bug.
Here's an example of the problem:
template1=# SELECT DISTINCT 'foo';
ERROR: Unable to identify an ordering operator '<' for type 'unknown'
Use an explicit ordering operator or modify the query
template1=# SELECT DISTINCT CAST ('foo' AS CHAR(3));
?column?
----------
foo
(1 row)
template1=#
Notice that we have to use a CAST to avoid the bug, and it doesn't
seem necessary - all other RDBMSs we use don't require this. Please
tell us: Are there plans for fixing this? It's a pain to have to
change all our queries... Thanks!
matt
mcornell@spamcop.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mcornell@spamcop.net
Subject: Re: DISCTINCT and literals - Unable to identify an ordering operator
In-Reply-To: <e991097a.0112071040.70ed9077@posting.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox