Received: from sss.pgh.pa.us (tlane-gw0.cust.stargate.net [209.114.132.154]) by hub.org (8.10.1/8.10.1) with ESMTP id e8FEDVs68774 for ; Fri, 15 Sep 2000 10:13:31 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.0/8.11.0) with ESMTP id e8FEDJB20142; Fri, 15 Sep 2000 10:13:19 -0400 (EDT) To: Jerome Raupach cc: pgsql-sql@postgresql.org Subject: Re: Error with DISTINCT In-reply-to: <39C1E5D4.6D0F1DFC@intelcom.fr> References: <39C1E5D4.6D0F1DFC@intelcom.fr> Comments: In-reply-to Jerome Raupach message dated "Fri, 15 Sep 2000 11:03:16 +0200" Date: Fri, 15 Sep 2000 10:13:19 -0400 Message-ID: <20139.969027199@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200009/114 Jerome Raupach writes: > testdb=#SELECT DISTINCT table_2.f1, table_1.f2, '2000-08-22' AS > testdb-#date FROM table_1, table_2 WHERE table_1.f1 = table_2.f1; > ERROR: Unable to identify an ordering operator '<' for type 'unknown' > Use an explicit ordering operator or modify the query > Is it a bug ? No, I don't think so. The system has no way to intuit what datatype you consider '2000-08-22' to be. SELECT DISTINCT table_2.f1, table_1.f2, '2000-08-22'::date ... would work. regards, tom lane