On Mon, 01 Aug 2022 at 22:16, Tom Lane <t...@sss.pgh.pa.us> wrote: > John Naylor <john.nay...@enterprisedb.com> writes: >> You are correct, but I wonder if it'd be better to just drop the comment >> entirely. I checked a couple other random headers with function >> declarations and they didn't have such a comment, and it's kind of obvious >> what they're for. > > Some places have these, some don't. It's probably more useful where > a header foo.h is declaring functions that aren't in the obviously > corresponding foo.c file, or live in multiple files. In this case > I agree it's not adding much. >
Attached patch to remove this comment. Please take a look. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd.
diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalog/pg_db_role_setting.h index 45d478e9e7..997a43e373 100644 --- a/src/include/catalog/pg_db_role_setting.h +++ b/src/include/catalog/pg_db_role_setting.h @@ -50,9 +50,6 @@ DECLARE_TOAST_WITH_MACRO(pg_db_role_setting, 2966, 2967, PgDbRoleSettingToastTab DECLARE_UNIQUE_INDEX_PKEY(pg_db_role_setting_databaseid_rol_index, 2965, DbRoleSettingDatidRolidIndexId, on pg_db_role_setting using btree(setdatabase oid_ops, setrole oid_ops)); -/* - * prototypes for functions in pg_db_role_setting.h - */ extern void AlterSetting(Oid databaseid, Oid roleid, VariableSetStmt *setstmt); extern void DropSetting(Oid databaseid, Oid roleid); extern void ApplySetting(Snapshot snapshot, Oid databaseid, Oid roleid, diff --git a/src/include/catalog/pg_enum.h b/src/include/catalog/pg_enum.h index 9c6deddc6a..497a498e5b 100644 --- a/src/include/catalog/pg_enum.h +++ b/src/include/catalog/pg_enum.h @@ -47,9 +47,6 @@ DECLARE_UNIQUE_INDEX_PKEY(pg_enum_oid_index, 3502, EnumOidIndexId, on pg_enum us DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index, 3503, EnumTypIdLabelIndexId, on pg_enum using btree(enumtypid oid_ops, enumlabel name_ops)); DECLARE_UNIQUE_INDEX(pg_enum_typid_sortorder_index, 3534, EnumTypIdSortOrderIndexId, on pg_enum using btree(enumtypid oid_ops, enumsortorder float4_ops)); -/* - * prototypes for functions in pg_enum.c - */ extern void EnumValuesCreate(Oid enumTypeOid, List *vals); extern void EnumValuesDelete(Oid enumTypeOid); extern void AddEnumLabel(Oid enumTypeOid, const char *newVal, diff --git a/src/include/catalog/pg_namespace.h b/src/include/catalog/pg_namespace.h index ba56e44d61..98eb29d0be 100644 --- a/src/include/catalog/pg_namespace.h +++ b/src/include/catalog/pg_namespace.h @@ -56,9 +56,6 @@ DECLARE_TOAST(pg_namespace, 4163, 4164); DECLARE_UNIQUE_INDEX(pg_namespace_nspname_index, 2684, NamespaceNameIndexId, on pg_namespace using btree(nspname name_ops)); DECLARE_UNIQUE_INDEX_PKEY(pg_namespace_oid_index, 2685, NamespaceOidIndexId, on pg_namespace using btree(oid oid_ops)); -/* - * prototypes for functions in pg_namespace.c - */ extern Oid NamespaceCreate(const char *nspName, Oid ownerId, bool isTemp); #endif /* PG_NAMESPACE_H */ diff --git a/src/include/catalog/pg_range.h b/src/include/catalog/pg_range.h index faa57e8cea..0918c4317a 100644 --- a/src/include/catalog/pg_range.h +++ b/src/include/catalog/pg_range.h @@ -60,10 +60,6 @@ typedef FormData_pg_range *Form_pg_range; DECLARE_UNIQUE_INDEX_PKEY(pg_range_rngtypid_index, 3542, RangeTypidIndexId, on pg_range using btree(rngtypid oid_ops)); DECLARE_UNIQUE_INDEX(pg_range_rngmultitypid_index, 2228, RangeMultirangeTypidIndexId, on pg_range using btree(rngmultitypid oid_ops)); -/* - * prototypes for functions in pg_range.c - */ - extern void RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation, Oid rangeSubOpclass, RegProcedure rangeCanonical, RegProcedure rangeSubDiff, Oid multirangeTypeOid);