Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btGL6-0004Eh-Nb for pgsql-general@arkaria.postgresql.org; Sun, 09 Oct 2016 15:48:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1btGL5-0004G6-U5 for pgsql-general@arkaria.postgresql.org; Sun, 09 Oct 2016 15:48:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1btGIo-0001hE-Dp for pgsql-general@postgresql.org; Sun, 09 Oct 2016 15:46:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1btGIh-0002Ku-Kd for pgsql-general@postgresql.org; Sun, 09 Oct 2016 15:46:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u99Fk4KJ019184; Sun, 9 Oct 2016 11:46:04 -0400 From: Tom Lane To: Seb cc: pgsql-general@postgresql.org Subject: Re: custom average window function failure In-reply-to: <87int2qkat.fsf@gmail.com> References: <87int2qkat.fsf@gmail.com> Comments: In-reply-to Seb message dated "Sat, 08 Oct 2016 22:21:30 -0500" Date: Sun, 09 Oct 2016 11:46:04 -0400 Message-ID: <19183.1476027964@sss.pgh.pa.us> X-Pg-Spam-Score: -4.6 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Seb 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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general