Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwYKs-00037M-Rf for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jan 2021 22:28:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kwYKq-00076h-KH for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jan 2021 22:28:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwYKq-00076a-EM for pgsql-bugs@lists.postgresql.org; Mon, 04 Jan 2021 22:28:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwYKk-0005za-7C for pgsql-bugs@lists.postgresql.org; Mon, 04 Jan 2021 22:28:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 104MSBF03321782; Mon, 4 Jan 2021 17:28:11 -0500 From: Tom Lane To: Rafi Shamim cc: Pavel Stehule , Jerry Sievert , PostgreSQL mailing lists Subject: Re: BUG #16804: substring() function returns "negative substring length" error when using a large length argument In-reply-to: References: <16804-f4eeeb6c11ba71d4@postgresql.org> <018A6952-DDF4-4728-AA47-A819CC6DB2CB@legitimatesounding.com> <3219376.1609795681@sss.pgh.pa.us> Comments: In-reply-to Rafi Shamim message dated "Mon, 04 Jan 2021 16:52:13 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3321780.1609799291.1@sss.pgh.pa.us> Date: Mon, 04 Jan 2021 17:28:11 -0500 Message-ID: <3321781.1609799291@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rafi Shamim writes: > I forgot to include this in my original bug report, but the bytea substring > function (which has a separate implementation in varlena.c) is also > affected. Um. And I bet the "bit" variant as well ... regards, tom lane