summaryrefslogtreecommitdiffstats
path: root/src/bin/psql/common.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
commit5e45211a64149b3c659b90ff2de6fa982a5a93ed (patch)
tree739caf8c461053357daa9f162bef34516c7bf452 /src/bin/psql/common.h
parentInitial commit. (diff)
downloadpostgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.tar.xz
postgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.zip
Adding upstream version 15.5.upstream/15.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bin/psql/common.h')
-rw-r--r--src/bin/psql/common.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h
new file mode 100644
index 0000000..d84c3a0
--- /dev/null
+++ b/src/bin/psql/common.h
@@ -0,0 +1,44 @@
+/*
+ * psql - the PostgreSQL interactive terminal
+ *
+ * Copyright (c) 2000-2022, PostgreSQL Global Development Group
+ *
+ * src/bin/psql/common.h
+ */
+#ifndef COMMON_H
+#define COMMON_H
+
+#include <setjmp.h>
+
+#include "fe_utils/print.h"
+#include "fe_utils/psqlscan.h"
+#include "libpq-fe.h"
+
+extern bool openQueryOutputFile(const char *fname, FILE **fout, bool *is_pipe);
+extern bool setQFout(const char *fname);
+
+extern char *psql_get_variable(const char *varname, PsqlScanQuoteType quote,
+ void *passthrough);
+
+extern void NoticeProcessor(void *arg, const char *message);
+
+extern volatile bool sigint_interrupt_enabled;
+
+extern sigjmp_buf sigint_interrupt_jmp;
+
+extern void psql_setup_cancel_handler(void);
+
+extern PGresult *PSQLexec(const char *query);
+extern int PSQLexecWatch(const char *query, const printQueryOpt *opt, FILE *printQueryFout);
+
+extern bool SendQuery(const char *query);
+
+extern bool is_superuser(void);
+extern bool standard_strings(void);
+extern const char *session_username(void);
+
+extern void expand_tilde(char **filename);
+
+extern bool recognized_connection_string(const char *connstr);
+
+#endif /* COMMON_H */