2 * psql - the PostgreSQL interactive terminal
4 * Copyright (c) 2000-2025, 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 what to conditionalize readline-dependent code on.
17#ifdef HAVE_LIBREADLINE
20#if defined(HAVE_READLINE_READLINE_H)
21#include <readline/readline.h>
22#if defined(HAVE_READLINE_HISTORY_H)
23#include <readline/history.h>
25#elif defined(HAVE_EDITLINE_READLINE_H)
26#include <editline/readline.h>
27#if defined(HAVE_EDITLINE_HISTORY_H)
28#include <editline/history.h>
30#elif defined(HAVE_READLINE_H)
32#if defined(HAVE_HISTORY_H)
35#endif /* HAVE_READLINE_READLINE_H, etc */
36#endif /* HAVE_LIBREADLINE */
46extern bool printHistory(
const char *fname,
unsigned short int pager);
static rewind_source * source