distinct. Is this the correct behaviour?

Поиск
Список
Период
Сортировка
От Vince Vielhaber
Тема distinct. Is this the correct behaviour?
Дата
Msg-id XFMail.991020195649.vev@michvhf.com
обсуждение исходный текст
Ответы Re: [HACKERS] distinct. Is this the correct behaviour?
Список pgsql-hackers
Is this the way distinct is supposed to work?  My intent is to give
only one for each different value of x - like it does in the first
distinct example.  But when order by is added for the date/time sort
I get what you see in the second distinct example.

pop4=> select * from foo;
x|y                           
-+----------------------------
1|Wed Oct 20 06:29:41 1999 EDT
1|Wed Oct 20 06:29:42 1999 EDT
1|Wed Oct 20 06:29:43 1999 EDT
1|Wed Oct 20 06:29:48 1999 EDT
(4 rows)

pop4=> select distinct x from foo;
x
-
1
(1 row)

pop4=> select distinct x from foo order by y;
x
-
1
1
1
1
(4 rows)



Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null # include <std/disclaimers.h>       Have you
seenhttp://www.pop4.net?       Online Campground Directory    http://www.camping-usa.com      Online Giftshop
Superstore   http://www.cloudninegifts.com
 
==========================================================================




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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: PostgreSQL Perl Module
Следующее
От: Bruce Momjian
Дата:
Сообщение: New psql startup banner