Header And Logo

PostgreSQL
| The world's most advanced open source database.

command.h

Go to the documentation of this file.
00001 /*
00002  * psql - the PostgreSQL interactive terminal
00003  *
00004  * Copyright (c) 2000-2013, PostgreSQL Global Development Group
00005  *
00006  * src/bin/psql/command.h
00007  */
00008 #ifndef COMMAND_H
00009 #define COMMAND_H
00010 
00011 #include "print.h"
00012 #include "psqlscan.h"
00013 
00014 
00015 typedef enum _backslashResult
00016 {
00017     PSQL_CMD_UNKNOWN = 0,       /* not done parsing yet (internal only) */
00018     PSQL_CMD_SEND,              /* query complete; send off */
00019     PSQL_CMD_SKIP_LINE,         /* keep building query */
00020     PSQL_CMD_TERMINATE,         /* quit program */
00021     PSQL_CMD_NEWEDIT,           /* query buffer was changed (e.g., via \e) */
00022     PSQL_CMD_ERROR              /* the execution of the backslash command
00023                                  * resulted in an error */
00024 } backslashResult;
00025 
00026 
00027 extern backslashResult HandleSlashCmds(PsqlScanState scan_state,
00028                 PQExpBuffer query_buf);
00029 
00030 extern int  process_file(char *filename, bool single_txn, bool use_relative_path);
00031 
00032 extern bool do_pset(const char *param,
00033         const char *value,
00034         printQueryOpt *popt,
00035         bool quiet);
00036 
00037 extern void connection_warnings(bool in_startup);
00038 
00039 extern void SyncVariables(void);
00040 
00041 extern void UnsyncVariables(void);
00042 
00043 #endif   /* COMMAND_H */