Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aQzgN-0005eD-Qh for pgsql-admin@arkaria.postgresql.org; Wed, 03 Feb 2016 15:49:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aQzgN-0000Tk-DY for pgsql-admin@arkaria.postgresql.org; Wed, 03 Feb 2016 15:49:27 +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) (envelope-from ) id 1aQzej-0006xr-8X for pgsql-admin@postgresql.org; Wed, 03 Feb 2016 15:47:45 +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) (envelope-from ) id 1aQzeg-0000IC-8w for pgsql-admin@postgresql.org; Wed, 03 Feb 2016 15:47:44 +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 u13FleWQ030968; Wed, 3 Feb 2016 10:47:40 -0500 From: Tom Lane To: clingareddy@vsoftcorp.com cc: pgsql-admin@postgresql.org Subject: Re: =?utf-8?Q?invalid_memory_alloc_request_size_18446744073709551614=0A?= In-reply-to: <1454496310.031717503@apps.rackspace.com> References: <1454496310.031717503@apps.rackspace.com> Comments: In-reply-to clingareddy@vsoftcorp.com message dated "Wed, 03 Feb 2016 16:15:10 +0530" Date: Wed, 03 Feb 2016 10:47:40 -0500 Message-ID: <30967.1454514460@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org clingareddy@vsoftcorp.com writes: > While running a Query in PostgreSQL i am getting below error. > SELECT count(1) ,SUM (DECODE(cr_ind, 'Y', NVL(numeric_amt, 0), 0)) cr_amt, SUM (DECODE(cr_ind, 'Y', 0, NVL(numeric_amt, 0))) db_amt , sum(decode(cr_ind, 'Y', 1, 0)) cr_cnt, sum(decode(cr_ind, 'Y', 0, 1)) db_cnt FROM ITEM_2015_1 a WHERE a.NUMERIC_AMT = 13066.00 and NVL(a.FLD_6_NUM,0) = 000014 and a.BUS_DATE = to_date('11212015','mmddyyyy') AND EXISTS (SELECT 1 FROM batch_master b WHERE a.BUS_DATE = b..BUS_DATE AND a.JOB_ID = b.JOB_ID AND a.BLK_NUM = b.BLK_NUM AND a.BCH_NUM = b.BCH_NUM ) > invalid memory alloc request size 18446744073709551614 Standard Postgres contains neither any nvl() function nor a four-argument version of decode(). A theory worth considering therefore is that this is a bug in whatever extension is providing those functions. If, as I suspect, you're running EDB's version of Postgres, you would be well advised to turn to them for support. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin