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

From Andrew Gierth
Subject Re: NULL-handling in aggregate(DISTINCT ...)
Date
Msg-id 87k4xwtj49.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:
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.
 
Tom> I doubt that very many people are depending on the behavior ofTom> array_agg(DISTINCT); and anyway it could be
arguedthat theTom> present behavior is a bug, since it doesn't work like standardTom> DISTINCT.  I don't see a problem
withchanging it, though itTom> should be release-noted.
 

A followup question: currently the code uses the "datum" interface for
tuplesort. Obviously with multiple columns the slot interface is used
instead; but is there any performance advantage for staying with the
datum interface for the single-column case?

-- 
Andrew.


pgsql-hackers by date:

Previous
From: "A.M."
Date:
Subject: Re: Listen / Notify rewrite
Next
From: Nikhil Sontakke
Date:
Subject: Re: Patch committers