Thread: invalid memory alloc request size 18446744073709551614
Hi Team,
While running a Query in PostgreSQL i am getting below error.
Query:
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 )
Error:
invalid memory alloc request size 18446744073709551614
Severity: ERROR
Code: XX000
Thanks,
Chandra kiran.
Please do not print this email unless it is absolutely necessary. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail and destroy all copies of this message and any attachments. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.Am 03.02.2016 um 11:45 schrieb clingareddy@vsoftcorp.com: > Hi Team, Hi, > > While running a Query in PostgreSQL i am getting below error. > > Query: > > 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 ) > I'm pretty sure that it's not about the query (see below). > Error: > > invalid memory alloc request size 18446744073709551614 > Severity: ERROR > Code: XX000 As googling the error quickly reveals http://www.postgresql.org/message-id/5863.1138032323@sss.pgh.pa.us and Tom Lane usually knows what he's talking about, I'd check for data corruption. Good luck! -- Gunnar "Nick" Bluth DBA ELSTER Tel: +49 911/991-4665 Mobil: +49 172/8853339
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_1a 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_IDAND 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