From: Jean-Luc Lachance <jllachan@nsd.ca>
To: Andreas Schlegel <schlegel@software.b.uunet.de>
Cc: pgsql <pgsql-sql@postgresql.org>
Subject: Re: Error with DISTINCT and AS keywords
Date: Wed, 10 Jul 2002 11:22:09 -0400
Message-ID: <3D2C5121.C26FD800@nsd.ca> (raw)
References: <3D2C2140.7060003@software.b.uunet.de>
PostgreSQL does not know how to sort 'TEST'.
You must help it be telling it what tpe it is.
Add ::text after 'TEST' as in 'TEST'::text.
Maybe PostgreSQL should default to text for unknown types...
JLL
Andreas Schlegel wrote:
>
> Hi,
>
> I need some help to let this sql statement run with Postgres 7.2.1
>
> Doesn't work:
> select DISTINCT tnr, titel, 'TEST' AS testcol from tTitel;
> ERROR: Unable to identify an ordering operator '<' for type 'unknown'
> Use an explicit ordering operator or modify the query
>
> If I remove the DISTINCT keyword it works:
> select tnr, titel, 'TEST' AS testcol from tTitel;
>
> Greetings,
> Andreas
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
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: jllachan@nsd.ca, schlegel@software.b.uunet.de
Subject: Re: Error with DISTINCT and AS keywords
In-Reply-To: <3D2C5121.C26FD800@nsd.ca>
* 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