PostgreSQL Source Code
git master
|
Go to the source code of this file.
Typedefs | |
typedef enum _backslashResult | backslashResult |
Enumerations | |
enum | _backslashResult { PSQL_CMD_UNKNOWN = 0 , PSQL_CMD_SEND , PSQL_CMD_SKIP_LINE , PSQL_CMD_TERMINATE , PSQL_CMD_NEWEDIT , PSQL_CMD_ERROR } |
Functions | |
backslashResult | HandleSlashCmds (PsqlScanState scan_state, ConditionalStack cstack, PQExpBuffer query_buf, PQExpBuffer previous_buf) |
int | process_file (char *filename, bool use_relative_path) |
bool | do_pset (const char *param, const char *value, printQueryOpt *popt, bool quiet) |
printQueryOpt * | savePsetInfo (const printQueryOpt *popt) |
void | restorePsetInfo (printQueryOpt *popt, printQueryOpt *save) |
void | connection_warnings (bool in_startup) |
void | SyncVariables (void) |
void | UnsyncVariables (void) |
typedef enum _backslashResult backslashResult |
enum _backslashResult |
void connection_warnings | ( | bool | in_startup | ) |
Definition at line 3946 of file command.c.
References _, _psqlSettings::db, formatPGVersionNumber(), _psqlSettings::notty, PQparameterStatus(), printf, printGSSInfo(), printSSLInfo(), _psqlSettings::progname, pset, _psqlSettings::quiet, server_version, and _psqlSettings::sversion.
Referenced by CheckConnection(), do_connect(), and main().
bool do_pset | ( | const char * | param, |
const char * | value, | ||
printQueryOpt * | popt, | ||
bool | quiet | ||
) |
Definition at line 4565 of file command.c.
References Assert, printTableOpt::border, printTableOpt::columns, printTableOpt::csvFieldSep, printTableOpt::default_footer, printTableOpt::expanded, printTableOpt::expanded_header_exact_width, printTableOpt::expanded_header_width_type, printTableOpt::fieldSep, fmt, printTableOpt::format, free, i, lengthof, printTableOpt::line_style, name, printQueryOpt::nullPrint, printTableOpt::numericLocale, printTableOpt::pager, printTableOpt::pager_min_lines, ParseVariableBool(), ParseVariableNum(), pg_asciiformat, pg_asciiformat_old, pg_log_error, pg_strcasecmp(), pg_strdup(), pg_strncasecmp(), pg_utf8format, _psqlSettings::popt, PRINT_ALIGNED, PRINT_ASCIIDOC, PRINT_CSV, PRINT_HTML, PRINT_LATEX, PRINT_LATEX_LONGTABLE, PRINT_TROFF_MS, PRINT_UNALIGNED, PRINT_WRAPPED, PRINT_XHEADER_COLUMN, PRINT_XHEADER_EXACT_WIDTH, PRINT_XHEADER_FULL, PRINT_XHEADER_PAGE, printPsetInfo(), pset, PsqlVarEnumError(), printTableOpt::recordSep, refresh_utf8format(), separator::separator, separator::separator_zero, set_unicode_line_style(), printTableOpt::tableAttr, printQueryOpt::title, printQueryOpt::topt, printTableOpt::tuples_only, printTableOpt::unicode_border_linestyle, printTableOpt::unicode_column_linestyle, printTableOpt::unicode_header_linestyle, and value.
Referenced by exec_command_a(), exec_command_C(), exec_command_f(), exec_command_html(), exec_command_pset(), exec_command_t(), exec_command_T(), exec_command_x(), parse_psql_options(), and process_command_g_options().
backslashResult HandleSlashCmds | ( | PsqlScanState | scan_state, |
ConditionalStack | cstack, | ||
PQExpBuffer | query_buf, | ||
PQExpBuffer | previous_buf | ||
) |
Definition at line 218 of file command.c.
References arg, Assert, conditional_active(), conditional_stack_pop(), conditional_stack_push(), _psqlSettings::cur_cmd_interactive, exec_command(), fflush(), free, IFSTATE_IGNORED, OT_NORMAL, OT_WHOLE_LINE, pg_log_error, pg_log_error_hint, pg_log_warning, pset, PSQL_CMD_ERROR, PSQL_CMD_UNKNOWN, psql_scan_slash_command(), psql_scan_slash_command_end(), psql_scan_slash_option(), and _psqlSettings::queryFout.
Referenced by main(), and MainLoop().
int process_file | ( | char * | filename, |
bool | use_relative_path | ||
) |
Definition at line 4412 of file command.c.
References canonicalize_path(), EXIT_FAILURE, fd(), filename, get_parent_directory(), has_drive_prefix(), _psqlSettings::inputfile, is_absolute_path, join_path_components(), MainLoop(), MAXPGPATH, PG_BINARY_R, pg_log_error, PG_LOG_FLAG_TERSE, pg_logging_config(), pset, relpath, and strlcpy().
Referenced by exec_command_include().
void restorePsetInfo | ( | printQueryOpt * | popt, |
printQueryOpt * | save | ||
) |
Definition at line 5154 of file command.c.
References Assert, printTableOpt::fieldSep, printQueryOpt::footers, free, printQueryOpt::nullPrint, printTableOpt::recordSep, separator::separator, printTableOpt::tableAttr, printQueryOpt::title, printQueryOpt::topt, and printQueryOpt::translate_columns.
Referenced by process_command_g_options(), and SendQuery().
printQueryOpt* savePsetInfo | ( | const printQueryOpt * | popt | ) |
Definition at line 5118 of file command.c.
References Assert, printTableOpt::fieldSep, printQueryOpt::footers, printQueryOpt::nullPrint, pg_malloc(), pg_strdup(), printTableOpt::recordSep, separator::separator, printTableOpt::tableAttr, printQueryOpt::title, printQueryOpt::topt, and printQueryOpt::translate_columns.
Referenced by exec_command_g(), and process_command_g_options().
void SyncVariables | ( | void | ) |
Definition at line 4074 of file command.c.
References _psqlSettings::db, _psqlSettings::encoding, printTableOpt::encoding, formatPGVersionNumber(), pg_encoding_to_char, _psqlSettings::popt, PQclientEncoding(), PQdb(), PQhost(), PQparameterStatus(), PQport(), PQserverVersion(), PQsetErrorContextVisibility(), PQsetErrorVerbosity(), PQuser(), pset, server_version, SetVariable(), _psqlSettings::show_context, snprintf, _psqlSettings::sversion, printQueryOpt::topt, _psqlSettings::vars, and _psqlSettings::verbosity.
Referenced by CheckConnection(), do_connect(), and main().
void UnsyncVariables | ( | void | ) |
Definition at line 4115 of file command.c.
References pset, SetVariable(), and _psqlSettings::vars.
Referenced by CheckConnection(), and do_connect().