Re: pgsql: Refactor attribute mappings used in logical tupleconversion

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Refactor attribute mappings used in logical tupleconversion
Дата
Msg-id 20191218101338.GB325369@paquier.xyz
обсуждение исходный текст
Ответ на pgsql: Refactor attribute mappings used in logical tuple conversion  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pgsql: Refactor attribute mappings used in logical tuple conversion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
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

Вложения

В списке pgsql-committers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: pgsql: Partially deduplicate interrupt handling for background processe
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Refactor attribute mappings used in logical tuple conversion