Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLMxo-0006hN-4x for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Sep 2013 00:46:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VLMxn-0005j6-Hi for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Sep 2013 00:46:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLMxl-0005ix-KM for pgsql-bugs@postgresql.org; Mon, 16 Sep 2013 00:46:49 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLMxe-0005Da-G5 for pgsql-bugs@postgresql.org; Mon, 16 Sep 2013 00:46:49 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 60AE0508BF8 for ; Mon, 16 Sep 2013 02:46:40 +0200 (CEST) X-Virus-Scanned: G-Hosting.cz + Station.cz + Klenot.cz + Subreg.cz amavisd-new at antispam.gransy.com Received: from mail.gransy.com ([82.208.44.189]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id tQlP9HUTsUq4 for ; Mon, 16 Sep 2013 02:46:40 +0200 (CEST) Received: by mail.gransy.com (Postfix, from userid 5000) id B4F7D508BFF; Mon, 16 Sep 2013 02:46:38 +0200 (CEST) Received: from [192.168.1.227] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 86243508BF8 for ; Mon, 16 Sep 2013 02:46:38 +0200 (CEST) Message-ID: <523654EE.7000806@fuzzy.cz> Date: Mon, 16 Sep 2013 02:46:38 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #8451: quantile extension: memory corruption? References: <52345299.6040105@fuzzy.cz> In-Reply-To: <52345299.6040105@fuzzy.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 14.9.2013 14:12, Tomas Vondra wrote: > On 13.9.2013 18:07, stephane.wustner@lip6.fr wrote: >> The following bug has been logged on the website: >> >> Bug reference: 8451 >> Logged by: strexxx >> Email address: stephane.wustner@lip6.fr >> PostgreSQL version: 9.1.9 >> Operating system: Linux 3.8.0-27-generic #40-Ubuntu SMP x86_64 >> Description: >> >> A query such as this one >> COPY (SELECT e,quantile(EXTRACT(EPOCH >> FROM(d)),ARRAY[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1]) AS d FROM (SELECT >> e,max(time)-min(time) AS d FROM bb RIGHT JOIN (SELECT s,e FROM ss RIGHT JOIN >> (SELECT e FROM ee WHERE h ~* 'blah') AS i0 USING(e)) AS i0 USING >> (sessionid) GROUP BY e,ei) AS i1 GROUP BY e) TO 'full_path/d.csv' WITH >> CSV;" > > Hi, > > this seems like a bug in the "quantile" extension, which is developed > and distributed completely separately from PostgreSQL. So pgsql-bugs is > not the right place to report the issue. > > I reported the issue on github and I'll look into that today/tomorrow > > https://github.com/tvondra/quantile/issues/4 > > so far it seems like a trivial bug in handling NULL values. And indeed it was a bug in handling NULL values - the PG_ARGISNULL happened too late. I plan to do few more improvements before pushing new version to pgxn, but you may grab the sources from github directly. Tomas -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs