diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-12-11 19:15:30 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-12-11 19:15:30 +0100 |
commit | d2a2808eb444986d2fe716a48e21993329142f3d (patch) | |
tree | da7ab60d3feeaf2979bd1bd3301698ea515e03a6 /src/bin/pg_dump/pg_backup_utils.h | |
parent | 525e60b7429925d09fce1b5aa0bc2f23cfe6dd18 (diff) | |
download | postgresql-d2a2808eb444986d2fe716a48e21993329142f3d.tar.gz postgresql-d2a2808eb444986d2fe716a48e21993329142f3d.zip |
pg_dump: Don't use enums for defining bit mask values
This usage would mean that values of the enum type are potentially not
one of the enum values. Use macros instead, like everywhere else.
Discussion: https://www.postgresql.org/message-id/14dde730-1d34-260e-fa9d-7664df2d6313@enterprisedb.com
Diffstat (limited to 'src/bin/pg_dump/pg_backup_utils.h')
-rw-r--r-- | src/bin/pg_dump/pg_backup_utils.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bin/pg_dump/pg_backup_utils.h b/src/bin/pg_dump/pg_backup_utils.h index ca51e259665..2bea167a69b 100644 --- a/src/bin/pg_dump/pg_backup_utils.h +++ b/src/bin/pg_dump/pg_backup_utils.h @@ -17,13 +17,11 @@ #include "common/logging.h" -typedef enum /* bits returned by set_dump_section */ -{ - DUMP_PRE_DATA = 0x01, - DUMP_DATA = 0x02, - DUMP_POST_DATA = 0x04, - DUMP_UNSECTIONED = 0xff -} DumpSections; +/* bits returned by set_dump_section */ +#define DUMP_PRE_DATA 0x01 +#define DUMP_DATA 0x02 +#define DUMP_POST_DATA 0x04 +#define DUMP_UNSECTIONED 0xff typedef void (*on_exit_nicely_callback) (int code, void *arg); |