| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Jerome Raupach <jraupach(at)intelcom(dot)fr> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Error with DISTINCT |
| Date: | 2000-09-15 14:13:19 |
| Message-ID: | 20139.969027199@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Jerome Raupach <jraupach(at)intelcom(dot)fr> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stuart Foster | 2000-09-15 15:24:45 | Where to get benchmark testing |
| Previous Message | Rommel B. Abaya | 2000-09-15 12:29:16 | Re: get table schema in psql? |