summaryrefslogtreecommitdiff
path: root/src/include/commands/copy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/commands/copy.h')
-rw-r--r--src/include/commands/copy.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h
index 8694da5004c..cb0096aeb67 100644
--- a/src/include/commands/copy.h
+++ b/src/include/commands/copy.h
@@ -20,6 +20,17 @@
#include "tcop/dest.h"
/*
+ * Represents whether a header line should be present, and whether it must
+ * match the actual names (which implies "true").
+ */
+typedef enum CopyHeaderChoice
+{
+ COPY_HEADER_FALSE = 0,
+ COPY_HEADER_TRUE,
+ COPY_HEADER_MATCH,
+} CopyHeaderChoice;
+
+/*
* A struct to hold COPY options, in a parsed form. All of these are related
* to formatting, except for 'freeze', which doesn't really belong here, but
* it's expedient to parse it along with all the other options.
@@ -32,7 +43,7 @@ typedef struct CopyFormatOptions
bool binary; /* binary format? */
bool freeze; /* freeze rows on loading? */
bool csv_mode; /* Comma Separated Value format? */
- bool header_line; /* header line? */
+ CopyHeaderChoice header_line; /* header line? */
char *null_print; /* NULL marker string (server encoding!) */
int null_print_len; /* length of same */
char *null_print_client; /* same converted to file encoding */