Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by postgresql.org (Postfix) with ESMTP id 89E8F47596A for ; Wed, 10 Jul 2002 09:44:59 -0400 (EDT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 17SHmB-000575-0U for pgsql-sql@postgresql.org; Wed, 10 Jul 2002 14:45:03 +0100 Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 2B8A8144CB for ; Wed, 10 Jul 2002 14:31:16 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: pgsql Subject: Re: Error with DISTINCT and AS keywords Date: Wed, 10 Jul 2002 14:31:14 +0100 User-Agent: KMail/1.4.1 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207101431.14115.dev@archonet.com> X-Archive-Number: 200207/138 X-Sequence-Number: 8517 On Wednesday 10 Jul 2002 1:25 pm, Achilleus Mantzios wrote: > On Wed, 10 Jul 2002, Andreas Schlegel wrote: > > 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 > > Do it as > > select DISTINCT tnr, titel, 'TEST'::text AS testcol from tTitel; Does anyone know what type a quoted literal has? The error message reports= =20 "unknown" - is that because it may be a date? It does strike me as a little= =20 unexpected that a quoted string doesn't default to text. - Richard Huxton