XLOG_FROM_ANY = 0, /* request to read WAL from any source */
XLOG_FROM_ARCHIVE, /* restored using restore_command */
XLOG_FROM_PG_XLOG, /* existing file in pg_xlog */
- XLOG_FROM_STREAM, /* streamed from master */
+ XLOG_FROM_STREAM /* streamed from master */
} XLogSource;
/* human-readable names for XLogSources, for debugging output */
/* Forward declaration of functions */
-static char **psql_completion(char *text, int start, int end);
+static char **psql_completion(const char *text, int start, int end);
static char *create_command_generator(const char *text, int state);
static char *drop_command_generator(const char *text, int state);
static char *complete_from_query(const char *text, int state);
const char *text, int state);
static char *complete_from_list(const char *text, int state);
static char *complete_from_const(const char *text, int state);
-static char **complete_from_variables(char *text,
+static char **complete_from_variables(const char *text,
const char *prefix, const char *suffix);
static char *complete_from_files(const char *text, int state);
initialize_readline(void)
{
rl_readline_name = (char *) pset.progname;
- rl_attempted_completion_function = (void *) psql_completion;
+ rl_attempted_completion_function = psql_completion;
rl_basic_word_break_characters = WORD_BREAKS;
* completion_matches() function, so we don't have to worry about it.
*/
static char **
-psql_completion(char *text, int start, int end)
+psql_completion(const char *text, int start, int end)
{
/* This is the variable we'll return. */
char **matches = NULL;
* to support quoting usages.
*/
static char **
-complete_from_variables(char *text, const char *prefix, const char *suffix)
+complete_from_variables(const char *text, const char *prefix, const char *suffix)
{
char **matches;
char **varnames;