Skip site navigation (1) Skip section navigation (2)

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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Hide most variable-length fields from Form_pg_* structs
Date: 2012-01-27 18:21:54
Message-ID: E1RqqQs-0005fY-Mf@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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(-)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2012-01-27 19:21:58
Subject: pgsql: Disallow ALTER DOMAIN on non-domain type everywhere
Previous:From: Robert HaasDate: 2012-01-27 17:42:41
Subject: pgsql: Document that COUNT(*) might not need a seq scan any more.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group