Re: DISTINCT to get distinct *substrings*?

Поиск
Список
Период
Сортировка
От Christoph Pingel
Тема Re: DISTINCT to get distinct *substrings*?
Дата
Msg-id E29F5655-863A-4745-8EB5-C062DB7D3D31@web.de
обсуждение исходный текст
Ответ на Re: DISTINCT to get distinct *substrings*?  ("Nikolay Samokhvalov" <samokhvalov@gmail.com>)
Ответы Re: DISTINCT to get distinct *substrings*?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Am 08.08.2006 um 19:49 schrieb Nikolay Samokhvalov:

> SELECT DISTINCT substring(attribute from '^http://[^/]*/') from pg_atp
> where attribute like 'http://%';
>
> w/o DISTINCT there should be duplicates (if any)
>
> don't use "DISTINCT ON" at all, it's evil :-) (why?
> http://chernowiki.ru/index.php?node=38#A13)

Thanks for the good advice! From reading this, it seems to be a
*really* bad thing. And I didn't get it from the official
documentation. :-)

ok, SELECT DISTINCT works, and it seems that the results are ordered
(by the substring) - is this the default behaviour or just by chance
(and probably version dependent)?

best regards,
Christoph

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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Practical maximums (was Re: PostgreSQL theoretical
Следующее
От: Christoph Pingel
Дата:
Сообщение: Re: DISTINCT to get distinct *substrings*?