Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btJpE-000622-Uo for pgsql-general@arkaria.postgresql.org; Sun, 09 Oct 2016 19:31:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1btJpC-0003A0-S3 for pgsql-general@arkaria.postgresql.org; Sun, 09 Oct 2016 19:31:54 +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 1btJpB-00039r-A8 for pgsql-general@postgresql.org; Sun, 09 Oct 2016 19:31:53 +0000 Received: from mail-it0-f52.google.com ([209.85.214.52]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1btJp8-0006Hs-7I for pgsql-general@postgresql.org; Sun, 09 Oct 2016 19:31:52 +0000 Received: by mail-it0-f52.google.com with SMTP id o19so61911365ito.1 for ; Sun, 09 Oct 2016 12:31:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:organization:mime-version; bh=URrYv+K22P6DXVx6Nv+vPK8ws74N2oPhyFT0+efq8Po=; b=ecpNBqcU4ornXsneHcbe7lAS+Rtlivzyy5KkuS2JTe05TzCukw7ujV9KvV/NvaGt+M R5m3WEFQWDeW5UdIVU6JEzSdNzPkN71TLE9EDowlQ3N600ts8tr6DCZ66GZ3B8mVXs19 RutZVvrYALszibgdQQZe/OlEyhGMFyLq2QN8OxqCJ+VWKY1xjV3ZTgUTULScvtr7bqmM bqG64mPIOouxJoy73hKjB8vajwxnyT5s4/icSxXLWecwdPvzZcEPNnqrtAZ/R3ZjCx6y QRAu1pU5i42a8u1aUO6hP4vqc14UGgpTbybd+3/QqUNcKeV80jHZKuGi6njZ89AaEgZ1 Emag== X-Gm-Message-State: AA6/9RnBx39HLaJcGIJOc+M7PdHaihsy0uLT9ifYe04uJ6OKxHrAkUNkQqHE5n/+NUPciw== X-Received: by 10.36.50.81 with SMTP id j78mr2959324ita.58.1476041508041; Sun, 09 Oct 2016 12:31:48 -0700 (PDT) Received: from smtp.gmail.com (S0106503955564c1f.wp.shawcable.net. [24.77.135.199]) by smtp.gmail.com with ESMTPSA id f201sm11704509ioe.28.2016.10.09.12.31.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Oct 2016 12:31:43 -0700 (PDT) From: Sebastian P. Luque To: Tom Lane Cc: Adrian Klaver , pgsql-general@postgresql.org Subject: Re: custom average window function failure References: <87int2qkat.fsf@gmail.com> <19183.1476027964@sss.pgh.pa.us> <1156e81d-0903-f453-6751-347d5105d4ca@aklaver.com> <4302.1476031209@sss.pgh.pa.us> Date: Sun, 09 Oct 2016 14:34:48 -0500 In-Reply-To: <4302.1476031209@sss.pgh.pa.us> (Tom Lane's message of "Sun, 09 Oct 2016 12:40:09 -0400") Message-ID: <87eg3puxif.fsf@otaria.sebmel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Organization: University of Manitoba MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -0.5 (/) 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 On Sun, 09 Oct 2016 12:40:09 -0400, Tom Lane wrote: > Adrian Klaver writes: >> On 10/09/2016 08:46 AM, Tom Lane wrote: >>> Clearly a bug --- the wrong type OIDs are being passed down to >>> array_append. It should be told that it's getting called as >> For my edification, why does this work?: > On closer inspection, the error is only in the > aggregate-used-as-window-function case, not plain aggregation. Yes, I see the same phenomenon. Could someone suggest a workaround until this is fixed? I'm under the gun to submit output tables and the only thing I can think of is a crawling slow loop to step through each window twice: once using the plain aggregation and another without just get all rows. I highly doubt it will be worthwhile, given it's going to be about 1000 iterations, and each one would take about 30-45 min... -- Seb -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general