Re: Error with DISTINCT and AS keywords

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Error with DISTINCT and AS keywords
Дата
Msg-id 200207101431.14115.dev@archonet.com
обсуждение исходный текст
Ответ на Re: Error with DISTINCT and AS keywords  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Ответы Re: Error with DISTINCT and AS keywords
Список pgsql-sql
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
"unknown" - is that because it may be a date? It does strike me as a little
unexpected that a quoted string doesn't default to text.

- Richard Huxton


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Help with function optimisation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error with DISTINCT and AS keywords