2 * psql - the PostgreSQL interactive terminal
4 * Copyright (c) 2000-2008, PostgreSQL Global Development Group
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 the definite pointers regarding existence or not.
17 #ifdef HAVE_LIBREADLINE
18 #define USE_READLINE 1
19 #if defined(HAVE_READLINE_READLINE_H)
20 #include <readline/readline.h>
21 #elif defined(HAVE_EDITLINE_READLINE_H)
22 #include <editline/readline.h>
23 #elif defined(HAVE_READLINE_H)
26 #if defined(HAVE_READLINE_HISTORY_H)
27 #include <readline/history.h>
28 #elif defined(HAVE_EDITLINE_HISTORY_H)
29 #include <editline/history.h>
30 #elif defined(HAVE_HISTORY_H)
35 #include "pqexpbuffer.h"
38 char *gets_interactive(const char *prompt
);
39 char *gets_fromFile(FILE *source
);
41 void initializeInput(int flags
);
42 bool saveHistory(char *fname
, bool encodeFlag
);
44 void pg_append_history(const char *s
, PQExpBuffer history_buf
);
45 void pg_send_history(PQExpBuffer history_buf
);