Re: hiding variable-length fields from Form_pg_* structs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: hiding variable-length fields from Form_pg_* structs
Date
Msg-id 20389.1322436018@sss.pgh.pa.us
Whole thread Raw
In response to hiding variable-length fields from Form_pg_* structs  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: hiding variable-length fields from Form_pg_* structs  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> CATALOG(pg_attribute,1249) BKI_BOOTSTRAP ...
> {
>     ...
>     int4        attinhcount;
>     Oid         attcollation;
>     aclitem     attacl[1];
> CATVARLEN(
>     text        attoptions[1];
>     text        attfdwoptions[1];
> )
> } FormData_pg_attribute;

> where CATVARLEN is defined empty in C, and ignored in the BKI generation
> code.

> The real trick is to find something that handles well with pgindent and
> indenting text editors.

The low-tech way would be

CATALOG(pg_attribute,1249) BKI_BOOTSTRAP ...
{   ...   int4        attinhcount;   Oid         attcollation;   aclitem     attacl[1];
#ifdef CATALOG_VARLEN_FIELDS   text        attoptions[1];   text        attfdwoptions[1];
#endif
} FormData_pg_attribute;
        regards, tom lane


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: logging in high performance systems.
Next
From: Tom Lane
Date:
Subject: Re: GiST for range types (was Re: Range Types - typo + NULL string constructor)