aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/common.h
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-12-02 11:18:56 +0900
committerMichael Paquier <michael@paquier.xyz>2019-12-02 11:18:56 +0900
commita4fd3aa719e8f97299dfcf1a8f79b3017e2b8d8b (patch)
tree5e2abc311e6f09a3788dd2989e8ed56555975291 /src/bin/scripts/common.h
parentc01ac6dcba0aa65ad237c3af4a67bc70da8e4b0e (diff)
downloadpostgresql-a4fd3aa719e8f97299dfcf1a8f79b3017e2b8d8b.tar.gz
postgresql-a4fd3aa719e8f97299dfcf1a8f79b3017e2b8d8b.zip
Refactor query cancellation code into src/fe_utils/
Originally, this code was duplicated in src/bin/psql/ and src/bin/scripts/, but it can be useful for other frontend applications, like pgbench. This refactoring offers the possibility to setup a custom callback which would get called in the signal handler for SIGINT or when the interruption console events happen on Windows. Author: Fabien Coelho, with contributions from Michael Paquier Reviewed-by: Álvaro Herrera, Ibrar Ahmed Discussion: https://postgr.es/m/alpine.DEB.2.21.1910311939430.27369@lancre
Diffstat (limited to 'src/bin/scripts/common.h')
-rw-r--r--src/bin/scripts/common.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/bin/scripts/common.h b/src/bin/scripts/common.h
index b8580f927a5..db2f85b4720 100644
--- a/src/bin/scripts/common.h
+++ b/src/bin/scripts/common.h
@@ -10,6 +10,7 @@
#define COMMON_H
#include "common/username.h"
+#include "fe_utils/cancel.h"
#include "getopt_long.h" /* pgrminclude ignore */
#include "libpq-fe.h"
#include "pqexpbuffer.h" /* pgrminclude ignore */
@@ -60,10 +61,4 @@ extern void appendQualifiedRelation(PQExpBuffer buf, const char *name,
extern bool yesno_prompt(const char *question);
-extern void setup_cancel_handler(void);
-
-extern void SetCancelConn(PGconn *conn);
-extern void ResetCancelConn(void);
-
-
#endif /* COMMON_H */