weird behaviour on DISTINCT ON

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: weird behaviour on DISTINCT ON
Date: 2005-01-31 11:25:13
Message-ID: ctl4im$iib$1@floppy.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Cave-Ayland 2005-01-31 12:34:02 7.3.8 under FC3 takes excessive semaphores?
Previous Message Manfred Koizar 2005-01-31 11:19:18 Re: Refactoring