Re: NULL-handling in aggregate(DISTINCT ...) - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: NULL-handling in aggregate(DISTINCT ...)
Date
Msg-id 87vdhgtt4t.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: NULL-handling in aggregate(DISTINCT ...)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: NULL-handling in aggregate(DISTINCT ...)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
> Andrew Gierth <andrew@tao11.riddles.org.uk> writes:>> Now the question: If the limit of one argument for DISTINCT
aggswere>> removed (which I'm considering doing as part of an update to the>> aggregate ORDER BY patch I posted a while
back),what should be the>> behaviour of agg(distinct x,y) where one or both of x or y is null?>> And should it depend
onthe strictness of the transition function?
 
Tom> I think you could probably just change it: make DISTINCT work asTom> per regular DISTINCT (treat null like a
value,keep one copy).Tom> All the spec-conforming aggregates are strict and would ignoreTom> the null in the next step
anyway.

Change it for single-arg DISTINCT too? And the resulting change to the
established behaviour of array_agg is acceptable? Just want to be clear
here.

-- 
Andrew.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Unpredictable shark slowdown after migrating to 8.4
Next
From: Tom Lane
Date:
Subject: Re: NULL-handling in aggregate(DISTINCT ...)