Re: [HACKERS] Bug Fix: COLLATE with multiple ORDER BYs in aggregates

2013-04-26 Thread Tom Lane
David Fetter writes: > While testing the upcoming FILTER clause for aggregates, Erik Rijkers > uncovered a long-standing bug in $subject, namely that this case > wasn't handled. Please find attached a patch by Andrew Gierth and > myself which fixes this issue and adds a regression test to ensure

Re: [HACKERS] Bug Fix: COLLATE with multiple ORDER BYs in aggregates

2013-04-25 Thread David Fetter
On Thu, Apr 25, 2013 at 06:04:10PM -0400, Tom Lane wrote: > Andres Freund writes: > > On 2013-04-25 13:42:32 -0400, Tom Lane wrote: > >> The argument for it seems to be that > >> array_agg(a COLLATE "C" ORDER BY b COLLATE "POSIX") > >> should not throw an error, but why not? > > > Uh. Why should

Re: [HACKERS] Bug Fix: COLLATE with multiple ORDER BYs in aggregates

2013-04-25 Thread Tom Lane
Andres Freund writes: > On 2013-04-25 13:42:32 -0400, Tom Lane wrote: >> The argument for it seems to be that >> array_agg(a COLLATE "C" ORDER BY b COLLATE "POSIX") >> should not throw an error, but why not? > Uh. Why should it? SELECT foo COLLATE "C" FROM ... ORDER BY bar COLLATE > "POSIX" does

Re: [HACKERS] Bug Fix: COLLATE with multiple ORDER BYs in aggregates

2013-04-25 Thread Andres Freund
On 2013-04-25 13:42:32 -0400, Tom Lane wrote: > David Fetter writes: > > While testing the upcoming FILTER clause for aggregates, Erik Rijkers > > uncovered a long-standing bug in $subject, namely that this case > > wasn't handled. Please find attached a patch by Andrew Gierth and > > myself whic

Re: [HACKERS] Bug Fix: COLLATE with multiple ORDER BYs in aggregates

2013-04-25 Thread Tom Lane
David Fetter writes: > While testing the upcoming FILTER clause for aggregates, Erik Rijkers > uncovered a long-standing bug in $subject, namely that this case > wasn't handled. Please find attached a patch by Andrew Gierth and > myself which fixes this issue and adds a regression test to ensure

Examples Re: [HACKERS] Bug Fix: COLLATE with multiple ORDER BYs in aggregates

2013-04-24 Thread David Fetter
On Tue, Apr 23, 2013 at 09:57:27AM -0700, David Fetter wrote: > Folks, > > While testing the upcoming FILTER clause for aggregates, Erik Rijkers > uncovered a long-standing bug in $subject, namely that this case > wasn't handled. Please find attached a patch by Andrew Gierth and > myself which fi

[HACKERS] Bug Fix: COLLATE with multiple ORDER BYs in aggregates

2013-04-23 Thread David Fetter
Folks, While testing the upcoming FILTER clause for aggregates, Erik Rijkers uncovered a long-standing bug in $subject, namely that this case wasn't handled. Please find attached a patch by Andrew Gierth and myself which fixes this issue and adds a regression test to ensure it remains fixed. Che