Re: Combination of ordered-set aggregate function terminates JDBC connection on PostgreSQL 9.6.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Lukas Eder <lukas(dot)eder(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Combination of ordered-set aggregate function terminates JDBC connection on PostgreSQL 9.6.5
Date: 2017-10-16 03:11:11
Message-ID: 11027.1508123471@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> BTW ... I was quite surprised to notice that the aggdirectargs
> are treated as a property that has to be matched in order to
> combine transition states. They aren't used during the transition
> phase, so this seems like a pointless constraint. We could move
> the aggdirectargs ExprState list to AggStatePerAggData and treat
> the aggdirectargs as part of the finalfn-related data, instead.

Here's a pretty-lightly-tested patch for that.

regards, tom lane

Attachment Content-Type Size
direct-args-are-not-transition-state.patch text/x-diff 4.4 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2017-10-16 03:50:15 Re: Improper const-evaluation of HAVING with grouping sets and subquery pullup
Previous Message Michael Paquier 2017-10-16 00:08:20 Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much