Thinking about this some more, would it be possible to treat these like we do parser/kwlist.h? Something like this:
commandtag_list.h: PG_COMMANDTAG(ALTER_ACCESS_METHOD, "ALTER ACCESS METHOD", true, false, false, false) ... then, just: #define PG_COMMANDTAG(taglabel, tagname, event_trigger, table_rewrite, display_rowcount, display_oid) label, typedef enum CommandTag { #include "commandtag_list.h" } #undef PG_COMMANDTAG ...and then: #define PG_COMMANDTAG(taglabel, tagname, event_trigger, table_rewrite, display_rowcount, display_oid) \ { tagname, event_trigger, table_rewrite, display_rowcount, display_oid }, const CommandTagBehavior tag_behavior[] = { #include "commandtag_list.h" } #undef PG_COMMANDTAG I'm hand-waving a bit, and it doesn't have the flexibility of a .dat file, but it's a whole lot simpler. -- John Naylor https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services