postgres.git / summary / log / commit / refs
commit c5111ea9ca049a650b63cdcb2551c330c2f998b1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu Nov 20 18:16:14 2014 +0000
First released in: 9.5.0
Remove no-longer-needed phony typedefs in genbki.h.
Now that we have a policy of hiding varlena catalog fields behind
"#ifdef CATALOG_VARLEN", there is no need for their type names to be
acceptable to the C compiler. And experimentation shows that it does
not matter to pgindent either. (If it did, we'd have problems anyway,
since these typedefs are unreferenced so far as the C compiler is
concerned, and find_typedef fails to identify such typedefs.)
Hence, remove the phony typedefs that genbki.h provided to make
some varlena field definitions compilable.
In passing, rearrange #define's into what seemed a more logical order.
src/include/catalog/genbki.h | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h
index cb40c07063b..709fd691dee 100644
--- a/src/include/catalog/genbki.h
+++ b/src/include/catalog/genbki.h
@@ -22,6 +22,13 @@
/* Introduces a catalog's structure definition */
#define CATALOG(name,oid) typedef struct CppConcat(FormData_,name)
+/* Options that may appear after CATALOG (on the same line) */
+#define BKI_BOOTSTRAP
+#define BKI_SHARED_RELATION
+#define BKI_WITHOUT_OIDS
+#define BKI_ROWTYPE_OID(oid)
+#define BKI_SCHEMA_MACRO
+
/*
* This is never defined; it's here only for documentation.
*
@@ -32,21 +39,10 @@
*/
#undef CATALOG_VARLEN
-/* Options that may appear after CATALOG (on the same line) */
-#define BKI_BOOTSTRAP
-#define BKI_SHARED_RELATION
-#define BKI_WITHOUT_OIDS
-#define BKI_ROWTYPE_OID(oid)
-#define BKI_SCHEMA_MACRO
-
/* Declarations that provide the initial content of a catalog */
/* In C, these need to expand into some harmless, repeatable declaration */
#define DATA(x) extern int no_such_variable
#define DESCR(x) extern int no_such_variable
#define SHDESCR(x) extern int no_such_variable
-/* PHONY type definitions for use in catalog structure definitions only */
-typedef int aclitem;
-typedef int pg_node_tree;
-
#endif /* GENBKI_H */
[parent: f9e0255c6fbe]