weird behaviour on DISTINCT ON - Mailing list pgsql-hackers

From Gaetano Mendola
Subject weird behaviour on DISTINCT ON
Date
Msg-id ctl4im$iib$1@floppy.pyrenet.fr
Whole thread Raw
Responses Re: weird behaviour on DISTINCT ON  (Greg Stark <gsstark@mit.edu>)
List 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





pgsql-hackers by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Refactoring
Next
From: "Mark Cave-Ayland"
Date:
Subject: 7.3.8 under FC3 takes excessive semaphores?