Doc: add commentary about cowboy assignment of maintenance_work_mem.
[pgsql.git] / src / bin / psql / input.h
blob6b2f84e0d0cf4dd6bc8adff636c72a3053fbb4ca
1 /*
2 * psql - the PostgreSQL interactive terminal
4 * Copyright (c) 2000-2025, PostgreSQL Global Development Group
6 * src/bin/psql/input.h
7 */
8 #ifndef INPUT_H
9 #define INPUT_H
12 * If some other file needs to have access to readline/history, include this
13 * file and save yourself all this work.
15 * USE_READLINE is what to conditionalize readline-dependent code on.
17 #ifdef HAVE_LIBREADLINE
18 #define USE_READLINE 1
20 #if defined(HAVE_READLINE_READLINE_H)
21 #include <readline/readline.h>
22 #if defined(HAVE_READLINE_HISTORY_H)
23 #include <readline/history.h>
24 #endif
25 #elif defined(HAVE_EDITLINE_READLINE_H)
26 #include <editline/readline.h>
27 #if defined(HAVE_EDITLINE_HISTORY_H)
28 #include <editline/history.h>
29 #endif
30 #elif defined(HAVE_READLINE_H)
31 #include <readline.h>
32 #if defined(HAVE_HISTORY_H)
33 #include <history.h>
34 #endif
35 #endif /* HAVE_READLINE_READLINE_H, etc */
36 #endif /* HAVE_LIBREADLINE */
38 #include "pqexpbuffer.h"
41 extern char *gets_interactive(const char *prompt, PQExpBuffer query_buf);
42 extern char *gets_fromFile(FILE *source);
44 extern void initializeInput(int flags);
46 extern bool printHistory(const char *fname, unsigned short int pager);
48 extern void pg_append_history(const char *s, PQExpBuffer history_buf);
49 extern void pg_send_history(PQExpBuffer history_buf);
51 #endif /* INPUT_H */