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.89) (envelope-from ) id 1ihkli-0006om-L6 for pgsql-committers@arkaria.postgresql.org; Thu, 19 Dec 2019 01:38:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihklh-0002Xe-1Z for pgsql-committers@arkaria.postgresql.org; Thu, 19 Dec 2019 01:38:21 +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 1ihklg-0002XX-Pd for pgsql-committers@lists.postgresql.org; Thu, 19 Dec 2019 01:38:20 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ihkla-00077D-60 for pgsql-committers@lists.postgresql.org; Thu, 19 Dec 2019 01:38:20 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id DB6382205E; Wed, 18 Dec 2019 20:38:12 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 18 Dec 2019 20:38:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=W7AZ/YerWSL/joix/iXaVgQeRpw 9oeCV3f9C9cxFqM0=; b=SH0D17vkPRB3aAAU9avJAV6Ps0pOQidCllojNCOPDTy u51xJTpf/KRdYoSPzD2lbiRdMu4UvqkYURDON9R6n70LFC2daCw8MA9PbMzQ1WEW FszkJbkWbGkWVk+oS6Z9SdpvW07OiutimQk0QH9whVZ08pmQD41TdPTSYwHSHvTz 5sWOeF6VLl8WNQ40h8NkdTzHq2HajzmnU7Svv0fza0XOaabGq9tK3vGx8f53McMS wQpRfFcmlVbu2BQ+r8DhrlHTr+pFEnD6KR3L5MVATv9HVjp/nm5+PuoQL79nO/AL Pa2RdYoHgE3X4CvWViHxQR03y0q/99+hTd8xZILSYDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=W7AZ/Y erWSL/joix/iXaVgQeRpw9oeCV3f9C9cxFqM0=; b=UaqWXMC+GsT/psppfJgP5n QGceNuPucSK9l/ZxY4EsTPvxwhCe9apcDYW4f+idLd9PvWTUkNTC1FcXa4cCAflg r5Bshba6Qq3rx3Arsq5zVgcJc1ozyTyL180yf/Ix786P88iW6x+EjM47PCY017IH wNd9h3HEzXZlb8mFHc97BQs7MEctMSQ+NmNaGew+OhV5PKXuDBYAhKlf5TvZBLId n9qxY7OJkORNSkLf3cZl4ZSbsvB4uoM/HxNb0WMX66rCbh7rtA9oSpR+GCBK/ijL ii3yWmfs5O5e7DfKEe17lWXgnyOwDx8IpagYjAjIIV42kLWGx8abdOFMO+1wct7g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddutddgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 31D4980061; Wed, 18 Dec 2019 20:38:11 -0500 (EST) Date: Thu, 19 Dec 2019 10:38:08 +0900 From: Michael Paquier To: Amit Langote Cc: Tom Lane , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Refactor attribute mappings used in logical tuple conversion Message-ID: <20191219013808.GB4202@paquier.xyz> References: <20191218101338.GB325369@paquier.xyz> <2517.1576679853@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kORqDWCi7qDJ0mEj" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --kORqDWCi7qDJ0mEj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 19, 2019 at 10:23:32AM +0900, Amit Langote wrote: > On Wed, Dec 18, 2019 at 11:37 PM Tom Lane wrote: >> TBH, though, I wonder if this doesn't indicate you've put this >> function in the wrong header to begin with. Why does it belong >> in rewriteManip? Thanks for the fix! I was going to address that this morning to notice that you already committed a fix. > Assuming you are talking about map_variable_attnos(), it's always been > in rewriteManip.c / rewriteManip.h since it was added by 541ffa65c32. >=20 > While reviewing this patch, I had the idea of moving it to the new > header attmap.h, but thought it might be a good idea to keep attmap.c > limited to just building the maps and not move into it other functions > that do something useful with those maps, like translating expression > trees, converting tuples, etc. I'd rather keep attmap.c focused on its basic work which is to make and build the attribute maps. For map_variable_attnos() & co, I am wondering if we should not split things even further. This code is located now in the rewriter, but we make use of it in the executor for partitioning. -- Michael --kORqDWCi7qDJ0mEj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl361IAACgkQnvQgOdby QH2SEw/+Ixz4wNYAf4vDXudvMouK6/VQtJnnB+AKJb42qr9Bo0iLp67i0IPnViwM TLWQB1R7ixiGDK4stjDNxWLAr8ZPCOkm3zYfCffLwbnuEL0h82dbHXT7ZB3ZNbyR 1EAncYY0PYeVs0r2N0iNalBcemMuxa2qugwNEtxLhihW0C5z+qNYyQpFg78YoyC/ J650OxjskmHpISX/XnQvplXJW/+z4PVc+EUw3iMN8KVGBc5awmv2F9XIgtAeC35D BPU9/Uk5Ywt3OD1oR2EIwN6nx0cLZgPYrHj0yaJC4SdlbAUzE9rqLa4X1G4jUcA3 zcxxqZmcDuWnbUDXj5CvAYJGu8SXHd8VX9S9uBZUleC0ATIp4u2BLYNadCH58t4G 89Z10973Sy9Q27/wVIUX89MK5p9dq4v4mIi/sFwZKg9ZaEj7iVepM6XEI2EOvqXj TL2mBuRyFXjf1thICuwDiMUx6eEHrzZZehiO3/iLYWZKGVHbZ3vULL18M5hB+fZj +uS+QyxXiDd96rh6e9QrQF/nsr/H2V8IXsMeY6HocRVA3bdhcqvNoPCiZFQioYMA dDPqEwWiNrf8+ewyILbAQ0///QKjcc7rBok9QShg/SJYt9IEc3FJXYIzjTSn1nBU V9cchBJHoOt4GgdzTL3l8aNL2UIbiU8TYYazMxtC3//QIohNWcQ= =XjUf -----END PGP SIGNATURE----- --kORqDWCi7qDJ0mEj--