aboutsummaryrefslogtreecommitdiff
path: root/src/include/commands/progress.h
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2021-03-09 14:21:03 +0900
committerMichael Paquier <michael@paquier.xyz>2021-03-09 14:21:03 +0900
commit9d2d45700928d49212fb7ed140feeaebe3a6014f (patch)
tree88c79348c8b63167cae1cf4636185cc48e24785b /src/include/commands/progress.h
parentf9264d1524baa19e4a0528f033681ef16f61b137 (diff)
downloadpostgresql-9d2d45700928d49212fb7ed140feeaebe3a6014f.tar.gz
postgresql-9d2d45700928d49212fb7ed140feeaebe3a6014f.zip
Add support for more progress reporting in COPY
The command (TO or FROM), its type (file, pipe, program or callback), and the number of tuples excluded by a WHERE clause in COPY FROM are added to the progress reporting already available. The column "lines_processed" is renamed to "tuples_processed" to disambiguate the meaning of this column in the cases of CSV and BINARY COPY and to be more consistent with the other catalog progress views. Bump catalog version, again. Author: Matthias van de Meent Reviewed-by: Michael Paquier, Justin Pryzby, Bharath Rupireddy, Josef Šimánek, Tomas Vondra Discussion: https://postgr.es/m/CAEze2WiOcgdH4aQA8NtZq-4dgvnJzp8PohdeKchPkhMY-jWZXA@mail.gmail.com
Diffstat (limited to 'src/include/commands/progress.h')
-rw-r--r--src/include/commands/progress.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/include/commands/progress.h b/src/include/commands/progress.h
index 95ec5d02e9c..c6b139d57d3 100644
--- a/src/include/commands/progress.h
+++ b/src/include/commands/progress.h
@@ -133,9 +133,22 @@
#define PROGRESS_BASEBACKUP_PHASE_WAIT_WAL_ARCHIVE 4
#define PROGRESS_BASEBACKUP_PHASE_TRANSFER_WAL 5
-/* Commands of PROGRESS_COPY */
+/* Progress parameters for PROGRESS_COPY */
#define PROGRESS_COPY_BYTES_PROCESSED 0
#define PROGRESS_COPY_BYTES_TOTAL 1
-#define PROGRESS_COPY_LINES_PROCESSED 2
+#define PROGRESS_COPY_TUPLES_PROCESSED 2
+#define PROGRESS_COPY_TUPLES_EXCLUDED 3
+#define PROGRESS_COPY_COMMAND 4
+#define PROGRESS_COPY_TYPE 5
+
+/* Commands of COPY (as advertised via PROGRESS_COPY_COMMAND) */
+#define PROGRESS_COPY_COMMAND_FROM 1
+#define PROGRESS_COPY_COMMAND_TO 2
+
+/* Types of COPY commands (as advertised via PROGRESS_COPY_TYPE) */
+#define PROGRESS_COPY_TYPE_FILE 1
+#define PROGRESS_COPY_TYPE_PROGRAM 2
+#define PROGRESS_COPY_TYPE_PIPE 3
+#define PROGRESS_COPY_TYPE_CALLBACK 4
#endif