Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jEvJH-00038e-6L for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2020 13:34:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jEvJE-0004J8-Iq for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2020 13:34:04 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1jEvJE-0004J0-BE for pgsql-bugs@lists.postgresql.org; Thu, 19 Mar 2020 13:34:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEvJA-0007XR-UC for pgsql-bugs@lists.postgresql.org; Thu, 19 Mar 2020 13:34:03 +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 02JDXaNP003516; Thu, 19 Mar 2020 09:33:36 -0400 From: Tom Lane To: Peter Eisentraut cc: Robert Haas , Amit Langote , digoal@126.com, PostgreSQL mailing lists Subject: Re: BUG #16302: too many range table entries - when count partition table(65538 childs) In-reply-to: <54912a3b-fec1-eb85-4971-46de1a1d0f5e@2ndquadrant.com> References: <16302-e45634e2c0e34e97@postgresql.org> <32763.1584198185@sss.pgh.pa.us> <28094.1584326310@sss.pgh.pa.us> <31331.1584452939@sss.pgh.pa.us> <1032.1584456128@sss.pgh.pa.us> <54912a3b-fec1-eb85-4971-46de1a1d0f5e@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Thu, 19 Mar 2020 12:04:21 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3514.1584624816.1@sss.pgh.pa.us> Date: Thu, 19 Mar 2020 09:33:36 -0400 Message-ID: <3515.1584624816@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > You could make INNER_VAR -1 and so on. Then it would probably break > quite clearly if it's not signedness clean. I kinda like this, because it'd avoid having random large constants in the code. We'd have to change Var.varno and some other places from Index to plain int, or else invent a typedef --- but the number of places currently using plain int for this sort of purpose is very large, so probably a new typedef is not worth the hassle. regards, tom lane