211 strncmp(line,
"PGDMP", 5) == 0)
214 puts(
_(
"The input is a PostgreSQL custom-format dump.\n"
215 "Use the pg_restore command-line client to restore this dump to a database.\n"));
295 puts(
_(
"Use \\? for help or press control-C to clear the input buffer."));
297 puts(
_(
"Use \\? for help."));
301 puts(
_(
"You are using psql, the command-line interface to PostgreSQL."));
302 printf(
_(
"Type: \\copyright for distribution terms\n"
303 " \\h for help with SQL commands\n"
304 " \\? for help with psql commands\n"
305 " \\g or terminate with semicolon to execute query\n"
326 puts(
_(
"Use \\q to quit."));
329 puts(
_(
"Use control-D to quit."));
331 puts(
_(
"Use control-C to quit."));
353 puts(
_(
"Use control-D to quit."));
355 puts(
_(
"Use control-C to quit."));
459 pg_log_error(
"query ignored; use \\endif or Ctrl-C to exit current \\if block");
618 pg_log_error(
"query ignored; use \\endif or Ctrl-C to exit current \\if block");
636 pg_log_error(
"reached EOF without finding closing \\endif(s)");
volatile sig_atomic_t sigint_interrupt_enabled
char * psql_get_variable(const char *varname, PsqlScanQuoteType quote, void *passthrough)
sigjmp_buf sigint_interrupt_jmp
bool standard_strings(void)
bool SendQuery(const char *query)
#define Assert(condition)
backslashResult HandleSlashCmds(PsqlScanState scan_state, ConditionalStack cstack, PQExpBuffer query_buf, PQExpBuffer previous_buf)
enum _backslashResult backslashResult
ConditionalStack conditional_stack_create(void)
bool conditional_stack_pop(ConditionalStack cstack)
void conditional_stack_destroy(ConditionalStack cstack)
bool conditional_active(ConditionalStack cstack)
bool conditional_stack_empty(ConditionalStack cstack)
char * pg_strdup(const char *in)
volatile sig_atomic_t cancel_pressed
#define pg_log_error(...)
const PsqlScanCallbacks psqlscan_callbacks
int MainLoop(FILE *source)
static rewind_source * source
int pg_strncasecmp(const char *s1, const char *s2, size_t n)
PQExpBuffer createPQExpBuffer(void)
void resetPQExpBuffer(PQExpBuffer str)
void destroyPQExpBuffer(PQExpBuffer str)
void appendPQExpBufferChar(PQExpBuffer str, char ch)
#define PQExpBufferBroken(str)
char * get_prompt(promptStatus_t status, ConditionalStack cstack)
enum _promptStatus promptStatus_t
void psql_scan_reset(PsqlScanState state)
void psql_scan_destroy(PsqlScanState state)
PsqlScanResult psql_scan(PsqlScanState state, PQExpBuffer query_buf, promptStatus_t *prompt)
PsqlScanState psql_scan_create(const PsqlScanCallbacks *callbacks)
void psql_scan_set_passthrough(PsqlScanState state, void *passthrough)
void psql_scan_setup(PsqlScanState state, const char *line, int line_len, int encoding, bool std_strings)
bool psql_scan_in_quote(PsqlScanState state)
void psql_scan_finish(PsqlScanState state)