postgresql/src/bin/psql/command.h

44 lines
1.1 KiB
C
Raw Normal View History

2000-01-19 00:30:24 +01:00
/*
* psql - the PostgreSQL interactive terminal
*
2017-01-03 19:48:53 +01:00
* Copyright (c) 2000-2017, PostgreSQL Global Development Group
2000-01-19 00:30:24 +01:00
*
2010-09-20 22:08:53 +02:00
* src/bin/psql/command.h
2000-01-19 00:30:24 +01:00
*/
#ifndef COMMAND_H
#define COMMAND_H
#include "fe_utils/print.h"
#include "fe_utils/psqlscan.h"
1999-11-05 00:14:30 +01:00
typedef enum _backslashResult
{
2006-10-04 02:30:14 +02:00
PSQL_CMD_UNKNOWN = 0, /* not done parsing yet (internal only) */
PSQL_CMD_SEND, /* query complete; send off */
PSQL_CMD_SKIP_LINE, /* keep building query */
PSQL_CMD_TERMINATE, /* quit program */
PSQL_CMD_NEWEDIT, /* query buffer was changed (e.g., via \e) */
PSQL_CMD_ERROR /* the execution of the backslash command
1999-11-05 00:14:30 +01:00
* resulted in an error */
} backslashResult;
1999-11-05 00:14:30 +01:00
extern backslashResult HandleSlashCmds(PsqlScanState scan_state,
2004-08-29 07:07:03 +02:00
PQExpBuffer query_buf);
1999-11-05 00:14:30 +01:00
extern int process_file(char *filename, bool use_relative_path);
1999-11-05 00:14:30 +01:00
extern bool do_pset(const char *param,
1999-11-05 00:14:30 +01:00
const char *value,
printQueryOpt *popt,
1999-11-05 00:14:30 +01:00
bool quiet);
extern void connection_warnings(bool in_startup);
extern void SyncVariables(void);
extern void UnsyncVariables(void);
#endif /* COMMAND_H */