Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

input.h

Blame
  • input.h 1.19 KiB
    /*
     * psql - the PostgreSQL interactive terminal
     *
     * Copyright (c) 2000-2006, PostgreSQL Global Development Group
     *
     * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.27 2006/03/21 13:38:12 momjian Exp $
     */
    #ifndef INPUT_H
    #define INPUT_H
    
    /*
     * If some other file needs to have access to readline/history, include this
     * file and save yourself all this work.
     *
     * USE_READLINE is the definite pointers regarding existence or not.
     */
    #ifdef HAVE_LIBREADLINE
    #define USE_READLINE 1
    #if defined(HAVE_READLINE_READLINE_H)
    #include <readline/readline.h>
    #elif defined(HAVE_EDITLINE_READLINE_H)
    #include <editline/readline.h>
    #elif defined(HAVE_READLINE_H)
    #include <readline.h>
    #endif
    #if defined(HAVE_READLINE_HISTORY_H)
    #include <readline/history.h>
    #elif defined(HAVE_EDITLINE_HISTORY_H)
    #include <editline/history.h>
    #elif defined(HAVE_HISTORY_H)
    #include <history.h>
    #endif
    #endif
    
    
    char	   *gets_interactive(const char *prompt);
    char	   *gets_fromFile(FILE *source);
    
    void		initializeInput(int flags);
    bool		saveHistory(char *fname, bool encodeFlag);
    
    void pg_append_history(char *s, PQExpBuffer history_buf);
    void pg_clear_history(PQExpBuffer history_buf);
    void pg_write_history(char *s);
    
    
    #endif   /* INPUT_H */