From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor attribute mappings used in logical tuple conversion
Date: Wed, 18 Dec 2019 19:13:38 +0900
Message-ID: <20191218101338.GB325369@paquier.xyz> (raw)
In-Reply-To: <E1ihTiP-0001A2-Lk@gemulon.postgresql.org>
References: <E1ihTiP-0001A2-Lk@gemulon.postgresql.org>
On Wed, Dec 18, 2019 at 07:25:49AM +0000, Michael Paquier wrote:
> Refactor attribute mappings used in logical tuple conversion
>
> Tuple conversion support in tupconvert.c is able to convert rowtypes
> between two relations, inner and outer, which are logically equivalent
> but have a different ordering or even dropped columns (used mainly for
> inheritance tree and partitions). This makes use of attribute mappings,
> which are simple arrays made of AttrNumber elements with a length
> matching the number of attributes of the outer relation. The length of
> the attribute mapping has been treated as completely independent of the
> mapping itself until now, making it easy to pass down an incorrect
> mapping length.
Hmm. All buildfarm members are happy with this change, except
prairiedog which is picky about the part in rewriteManip.h (dory is
failing now but it passed once before with this commit, longfin is
happy as well as my Mac laptop):
In file included from index.c:66:
../../../src/include/rewrite/rewriteManip.h:20: error: redefinition of
typedef 'AttrMap'
../../../src/include/access/attmap.h:38: error: previous declaration
of 'AttrMap' was here
An obvious fix would be to remove the declaration of AttrMap in
rewriteManip.h to have an inclusion of attnum.h so as rewriteManip.h
is still self-compilable, but I thought that we only wanted a
dependency to parsenodes.h there. Any thoughts?
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Refactor attribute mappings used in logical tuple conversion
In-Reply-To: <20191218101338.GB325369@paquier.xyz>
References: <E1ihTiP-0001A2-Lk@gemulon.postgresql.org> <20191218101338.GB325369@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox