Re: custom average window function failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seb <spluque(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: custom average window function failure
Date: 2016-10-09 15:46:04
Message-ID: 19183.1476027964@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Seb <spluque(at)gmail(dot)com> writes:
> Any thoughts on what has changed that is leading to this failure?

Clearly a bug --- the wrong type OIDs are being passed down to
array_append. It should be told that it's getting called as

(angle_vectors[], angle_vectors) returns angle_vectors[]

but what it's actually getting told is

(vector, angle_vectors) returns vector

which naturally makes it spit up because "vector" isn't an array type.
I don't think control ever reaches your custom finalfunc at all.

Probably somebody fat-fingered this while refactoring code in the
aggregate/windowfunction area. Possibly me :-(. Haven't found
exactly where things are going off the rails, but it's clearly
a PG bug. Thanks for the report!

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-10-09 16:23:28 Re: custom average window function failure
Previous Message Adrian Klaver 2016-10-09 15:37:22 Re: custom average window function failure