Re: select distinct null

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: select distinct null
Дата
Msg-id 005501c0765c$e69272c0$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на select distinct null  (<karol@gmweltel.com.pl>)
Ответы Re: select distinct null
Список pgsql-general
----- Original Message -----
From: <karol@gmweltel.com.pl>

> INSERT INTO table1 VALUES SELECT DISTINCT null,table2.atr1 FROM table2
> WHERE table2.atr1 > 0;
>
> It works in PostgreSQL 6.4.2 but in 7.0.3 it returns:
>
> ERROR:  Unable to identify an ordering operator '<' for type 'unknown'
>         Use an explicit ordering operator or modify the query
>
> I discovered that PostgreSQL 7.0.3 doesn't accept the querry:
>
> select distinct null;
>

Casting the null seems to do it.

select distinct null::text,a from foo;

works OK on my 7.0 here


- Richard Huxton


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

Предыдущее
От: Lincoln Yeoh
Дата:
Сообщение: Re: (not) freeing cursors
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: 7.0.3 rpm testing & other problems