PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
command.h
Go to the documentation of this file.
1/*
2 * psql - the PostgreSQL interactive terminal
3 *
4 * Copyright (c) 2000-2025, PostgreSQL Global Development Group
5 *
6 * src/bin/psql/command.h
7 */
8#ifndef COMMAND_H
9#define COMMAND_H
10
12#include "fe_utils/print.h"
13#include "fe_utils/psqlscan.h"
14
15typedef enum _backslashResult
16{
17 PSQL_CMD_UNKNOWN = 0, /* not done parsing yet (internal only) */
18 PSQL_CMD_SEND, /* query complete; send off */
19 PSQL_CMD_SKIP_LINE, /* keep building query */
20 PSQL_CMD_TERMINATE, /* quit program */
21 PSQL_CMD_NEWEDIT, /* query buffer was changed (e.g., via \e) */
22 PSQL_CMD_ERROR, /* the execution of the backslash command
23 * resulted in an error */
25
26
28 ConditionalStack cstack,
29 PQExpBuffer query_buf,
30 PQExpBuffer previous_buf);
31
32extern int process_file(char *filename, bool use_relative_path);
33
34extern bool do_pset(const char *param,
35 const char *value,
36 printQueryOpt *popt,
37 bool quiet);
38
39extern printQueryOpt *savePsetInfo(const printQueryOpt *popt);
40
41extern void restorePsetInfo(printQueryOpt *popt, printQueryOpt *save);
42
43extern void connection_warnings(bool in_startup);
44
45extern void SyncVariables(void);
46
47extern void UnsyncVariables(void);
48
49#endif /* COMMAND_H */
int process_file(char *filename, bool use_relative_path)
Definition: command.c:4770
void restorePsetInfo(printQueryOpt *popt, printQueryOpt *save)
Definition: command.c:5512
printQueryOpt * savePsetInfo(const printQueryOpt *popt)
Definition: command.c:5476
bool do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
Definition: command.c:4923
backslashResult HandleSlashCmds(PsqlScanState scan_state, ConditionalStack cstack, PQExpBuffer query_buf, PQExpBuffer previous_buf)
Definition: command.c:224
_backslashResult
Definition: command.h:16
@ PSQL_CMD_TERMINATE
Definition: command.h:20
@ PSQL_CMD_UNKNOWN
Definition: command.h:17
@ PSQL_CMD_NEWEDIT
Definition: command.h:21
@ PSQL_CMD_ERROR
Definition: command.h:22
@ PSQL_CMD_SEND
Definition: command.h:18
@ PSQL_CMD_SKIP_LINE
Definition: command.h:19
enum _backslashResult backslashResult
void UnsyncVariables(void)
Definition: command.c:4472
void SyncVariables(void)
Definition: command.c:4428
void connection_warnings(bool in_startup)
Definition: command.c:4300
static struct @162 value
static char * filename
Definition: pg_dumpall.c:123