Re: WITHIN GROUP patch

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: WITHIN GROUP patch
Date: 2013-12-23 18:48:52
Message-ID: 87eh53mmqz.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

Tom> What I'm now thinking we want to do is:

Tom> 1. Non-hypothetical direct args always contribute to determining
Tom> the agg's collation.

Tom> 2. Hypothetical and aggregated args contribute to the agg's
Tom> collation only if the agg is designed so that there is always
Tom> exactly one aggregated arg (ie, it's non-variadic with one
Tom> aggregated arg). Otherwise we assign their collations
Tom> per-sort-column and don't merge them into the aggregate's
Tom> collation.

Tom> This specification ensures that a variadic aggregate doesn't
Tom> change behavior depending on how many sort columns there happen
Tom> to be.

Works for me.

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-12-23 18:57:07 Re: preserving forensic information when we freeze
Previous Message Thom Brown 2013-12-23 18:42:26 Re: ALTER SYSTEM SET command to change postgresql.conf parameters