Thread: pgsql: Hide most variable-length fields from Form_pg_* structs

pgsql: Hide most variable-length fields from Form_pg_* structs

From
Peter Eisentraut
Date:
Hide most variable-length fields from Form_pg_* structs

Those fields only appear in the structs so that genbki.pl can create
the BKI bootstrap files for the catalogs.  But they are not actually
usable from C.  So hiding them can prevent coding mistakes, saves
stack space, and can help the compiler.

In certain catalogs, the first variable-length field has been kept
visible after manual inspection.  These exceptions are noted in C
comments.

reviewed by Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8137f2c32322c624e0431fac1621e8e9315202f9

Modified Files
--------------
src/backend/catalog/Catalog.pm                |    2 ++
src/include/catalog/genbki.h                  |   10 ++++++++++
src/include/catalog/pg_aggregate.h            |    4 +++-
src/include/catalog/pg_attrdef.h              |    2 ++
src/include/catalog/pg_attribute.h            |    8 +++-----
src/include/catalog/pg_class.h                |    9 +++------
src/include/catalog/pg_constraint.h           |    6 ++----
src/include/catalog/pg_database.h             |    4 +++-
src/include/catalog/pg_db_role_setting.h      |    2 ++
src/include/catalog/pg_default_acl.h          |    7 ++-----
src/include/catalog/pg_description.h          |    2 ++
src/include/catalog/pg_extension.h            |    9 +++------
src/include/catalog/pg_foreign_data_wrapper.h |    5 ++---
src/include/catalog/pg_foreign_server.h       |    6 ++----
src/include/catalog/pg_foreign_table.h        |    2 ++
src/include/catalog/pg_index.h                |    4 +++-
src/include/catalog/pg_language.h             |    2 ++
src/include/catalog/pg_largeobject.h          |    1 +
src/include/catalog/pg_largeobject_metadata.h |    2 ++
src/include/catalog/pg_namespace.h            |    4 +++-
src/include/catalog/pg_pltemplate.h           |    2 ++
src/include/catalog/pg_proc.h                 |    4 +++-
src/include/catalog/pg_rewrite.h              |    4 ++--
src/include/catalog/pg_seclabel.h             |    2 ++
src/include/catalog/pg_shdescription.h        |    2 ++
src/include/catalog/pg_shseclabel.h           |    2 ++
src/include/catalog/pg_statistic.h            |    2 ++
src/include/catalog/pg_tablespace.h           |    4 +++-
src/include/catalog/pg_trigger.h              |    5 ++++-
src/include/catalog/pg_ts_dict.h              |    2 ++
src/include/catalog/pg_type.h                 |    8 +++++---
src/include/catalog/pg_user_mapping.h         |    6 ++----
32 files changed, 85 insertions(+), 49 deletions(-)