weird behaviour on DISTINCT ON

Поиск
Список
Период
Сортировка
Hi all,
I have a query that is something like this:


SELECT DISTINCT ON ( x ) x, foo(x)
FROM ...


now what do I see is that for each different x value
the foo is executed more than once, I guess this is because
the distinct filter out the rows after executing the query.

Is this behaviour the normal one? Shall be not documented ?



Regards
Gaetano Mendola





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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Refactoring
Следующее
От: "Mark Cave-Ayland"
Дата:
Сообщение: 7.3.8 under FC3 takes excessive semaphores?