Re: catalog files simplification - Mailing list pgsql-hackers

From Robert Haas
Subject Re: catalog files simplification
Date
Msg-id CA+TgmobDragpJSJ8sd8D02a5BPsh2+=17_ob0TKrpSejHedy7w@mail.gmail.com
Whole thread Raw
In response to catalog files simplification  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: catalog files simplification
List pgsql-hackers
On Wed, Jun 12, 2019 at 7:52 AM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> The current catalog files all do this:
>
>     CATALOG(pg_aggregate,2600,AggregateRelationId)
>     {
>         ...
>     } FormData_pg_aggregate;
>
>     typedef FormData_pg_aggregate *Form_pg_aggregate;
>
> The bottom part of this seems redundant.  With the attached patch, we
> can generate that automatically, so this becomes just
>
>     CATALOG(pg_aggregate,2600,AggregateRelationId)
>     {
>         ...
>     };

Maybe the macro definition could be split across several lines instead
of having one really long line?

Are some compilers going to be sad about typedef struct x x; preceding
any declaration or definition of struct x?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: tableam: abstracting relation sizing code
Next
From: Tom Lane
Date:
Subject: Re: catalog files simplification