Re: pgsql: Refactor attribute mappings used in logical tuple conversion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Refactor attribute mappings used in logical tuple conversion
Дата
Msg-id 2517.1576679853@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Refactor attribute mappings used in logical tupleconversion  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pgsql: Refactor attribute mappings used in logical tuple conversion  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-committers
Michael Paquier <michael@paquier.xyz> writes:
> Hmm.  All buildfarm members are happy with this change, except
> prairiedog which is picky about the part in rewriteManip.h

It's not only prairiedog --- my RHEL6 workstation (gcc 4.4.7) is failing
as well, and I see buildfarm member grouse is unhappy too.  

> In file included from index.c:66:
> ../../../src/include/rewrite/rewriteManip.h:20: error: redefinition of
> typedef 'AttrMap'

This is simply the wrong way to do it.  What you have to do, if you
want to not include attmap.h here, is to say

struct AttrMap;

(no typedef) and then refer to it as "struct AttrMap" in the rest
of the header file.  There are lots of other examples in our headers.

BTW, it's also conventional to add a comment saying "this is to
avoid including foo.h", or equivalent.

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?

            regards, tom lane



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Refactor attribute mappings used in logical tupleconversion
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Minimal portability fix for commit e1551f96e.