aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-12-11 19:15:30 +0100
committerPeter Eisentraut <peter@eisentraut.org>2020-12-11 19:15:30 +0100
commitd2a2808eb444986d2fe716a48e21993329142f3d (patch)
treeda7ab60d3feeaf2979bd1bd3301698ea515e03a6 /src/bin/pg_dump/pg_backup_archiver.c
parent525e60b7429925d09fce1b5aa0bc2f23cfe6dd18 (diff)
downloadpostgresql-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_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index b961a24b36d..1f82c6499be 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -86,7 +86,7 @@ static void _selectTableAccessMethod(ArchiveHandle *AH, const char *tableam);
static void processEncodingEntry(ArchiveHandle *AH, TocEntry *te);
static void processStdStringsEntry(ArchiveHandle *AH, TocEntry *te);
static void processSearchPathEntry(ArchiveHandle *AH, TocEntry *te);
-static teReqs _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH);
+static int _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH);
static RestorePass _tocEntryRestorePass(TocEntry *te);
static bool _tocEntryIsACL(TocEntry *te);
static void _disableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te);
@@ -757,7 +757,7 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te, bool is_parallel)
{
RestoreOptions *ropt = AH->public.ropt;
int status = WORKER_OK;
- teReqs reqs;
+ int reqs;
bool defnDumped;
AH->currentTE = te;
@@ -1868,7 +1868,7 @@ getTocEntryByDumpId(ArchiveHandle *AH, DumpId id)
return NULL;
}
-teReqs
+int
TocIDRequired(ArchiveHandle *AH, DumpId id)
{
TocEntry *te = getTocEntryByDumpId(AH, id);
@@ -2803,10 +2803,10 @@ StrictNamesCheck(RestoreOptions *ropt)
* REQ_SCHEMA and REQ_DATA bits if we want to restore schema and/or data
* portions of this TOC entry, or REQ_SPECIAL if it's a special entry.
*/
-static teReqs
+static int
_tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH)
{
- teReqs res = REQ_SCHEMA | REQ_DATA;
+ int res = REQ_SCHEMA | REQ_DATA;
RestoreOptions *ropt = AH->public.ropt;
/* These items are treated specially */