1 /*
2  * psql - the PostgreSQL interactive terminal
3  *
4  * Copyright (c) 2000-2019, PostgreSQL Global Development Group
5  *
6  * src/bin/psql/command.h
7  */
8 #ifndef COMMAND_H
9 #define COMMAND_H
10 
11 #include "fe_utils/print.h"
12 #include "fe_utils/psqlscan.h"
13 #include "fe_utils/conditional.h"
14 
15 
16 typedef enum _backslashResult
17 {
18 	PSQL_CMD_UNKNOWN = 0,		/* not done parsing yet (internal only) */
19 	PSQL_CMD_SEND,				/* query complete; send off */
LanguageUtilTest()20 	PSQL_CMD_SKIP_LINE,			/* keep building query */
21 	PSQL_CMD_TERMINATE,			/* quit program */
22 	PSQL_CMD_NEWEDIT,			/* query buffer was changed (e.g., via \e) */
23 	PSQL_CMD_ERROR				/* the execution of the backslash command
24 								 * resulted in an error */
25 } backslashResult;
26 
27 
28 extern backslashResult HandleSlashCmds(PsqlScanState scan_state,
29 									   ConditionalStack cstack,
30 									   PQExpBuffer query_buf,
31 									   PQExpBuffer previous_buf);
32 
33 extern int	process_file(char *filename, bool use_relative_path);
basic_path_tests()34 
35 extern bool do_pset(const char *param,
36 					const char *value,
37 					printQueryOpt *popt,
38 					bool quiet);
39 
40 extern void connection_warnings(bool in_startup);
41 
42 extern void SyncVariables(void);
43 
44 extern void UnsyncVariables(void);
45 
46 #endif							/* COMMAND_H */
47