summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorMichael Paquier2022-10-11 02:45:52 +0000
committerMichael Paquier2022-10-11 02:45:52 +0000
commit9fcdf2c787ac6da330165ea3cd50ec5155943a2b (patch)
tree6e376c7b1258238403feb61da7fc90815d803258 /src/tools
parent0e87dfe46443286e630e9bcbc0c39a39c2c2cbb2 (diff)
Add support for COPY TO callback functions
This is useful as a way for extensions to process COPY TO rows in the way they see fit (say auditing, analytics, backend, etc.) without the need to invoke an external process running as the OS user running the backend through PROGRAM that requires superuser rights. COPY FROM already provides a similar callback for logical replication. For COPY TO, the callback is triggered when we are ready to send a row in CopySendEndOfRow(), which is the same code path as when sending a row to a frontend or a pipe/file. A small test module, test_copy_callbacks, is added to provide some coverage for this facility. Author: Bilva Sanaba, Nathan Bossart Discussion: https://postgr.es/m/253C21D1-FCEB-41D9-A2AF-E6517015B7D7@amazon.com
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/pgindent/typedefs.list1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 97c9bc18615..d9b839c9799 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -3177,6 +3177,7 @@ compare_context
config_var_value
contain_aggs_of_level_context
convert_testexpr_context
+copy_data_dest_cb
copy_data_source_cb
core_YYSTYPE
core_yy_extra_type