PostgreSQL Source Code  git master
common.h
Go to the documentation of this file.
1 /*
2  * psql - the PostgreSQL interactive terminal
3  *
4  * Copyright (c) 2000-2019, PostgreSQL Global Development Group
5  *
6  * src/bin/psql/common.h
7  */
8 #ifndef COMMON_H
9 #define COMMON_H
10 
11 #include <setjmp.h>
12 
13 #include "libpq-fe.h"
14 #include "fe_utils/print.h"
15 #include "fe_utils/psqlscan.h"
16 
17 extern bool openQueryOutputFile(const char *fname, FILE **fout, bool *is_pipe);
18 extern bool setQFout(const char *fname);
19 
20 extern char *psql_get_variable(const char *varname, PsqlScanQuoteType quote,
21  void *passthrough);
22 
23 extern void NoticeProcessor(void *arg, const char *message);
24 
25 extern volatile bool sigint_interrupt_enabled;
26 
27 extern sigjmp_buf sigint_interrupt_jmp;
28 
29 extern void setup_cancel_handler(void);
30 
31 extern void SetCancelConn(void);
32 extern void ResetCancelConn(void);
33 
34 extern PGresult *PSQLexec(const char *query);
35 extern int PSQLexecWatch(const char *query, const printQueryOpt *opt);
36 
37 extern bool SendQuery(const char *query);
38 
39 extern bool is_superuser(void);
40 extern bool standard_strings(void);
41 extern const char *session_username(void);
42 
43 extern void expand_tilde(char **filename);
44 
45 extern bool recognized_connection_string(const char *connstr);
46 
47 #endif /* COMMON_H */
bool recognized_connection_string(const char *connstr)
Definition: common.c:2442
bool SendQuery(const char *query)
Definition: common.c:1316
char * psql_get_variable(const char *varname, PsqlScanQuoteType quote, void *passthrough)
Definition: common.c:128
void setup_cancel_handler(void)
Definition: common.c:309
bool openQueryOutputFile(const char *fname, FILE **fout, bool *is_pipe)
Definition: common.c:49
volatile bool sigint_interrupt_enabled
Definition: common.c:251
bool standard_strings(void)
Definition: common.c:2310
void SetCancelConn(void)
Definition: common.c:437
bool setQFout(const char *fname)
Definition: common.c:84
bool is_superuser(void)
Definition: common.c:2287
PGresult * PSQLexec(const char *query)
Definition: common.c:681
PsqlScanQuoteType
Definition: psqlscan.h:52
void NoticeProcessor(void *arg, const char *message)
Definition: common.c:219
int PSQLexecWatch(const char *query, const printQueryOpt *opt)
Definition: common.c:736
void ResetCancelConn(void)
Definition: common.c:467
static char * filename
Definition: pg_dumpall.c:90
void * arg
void expand_tilde(char **filename)
Definition: common.c:2355
const char * session_username(void)
Definition: common.c:2334
sigjmp_buf sigint_interrupt_jmp
Definition: common.c:253
static char * connstr
Definition: pg_dumpall.c:61