PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
settings.h File Reference
#include "fe_utils/print.h"
#include "variables.h"
Include dependency graph for settings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _psqlSettings
 

Macros

#define DEFAULT_CSV_FIELD_SEP   ','
 
#define DEFAULT_FIELD_SEP   "|"
 
#define DEFAULT_RECORD_SEP   "\n"
 
#define DEFAULT_EDITOR   "vi"
 
#define DEFAULT_EDITOR_LINENUMBER_ARG   "+"
 
#define DEFAULT_PROMPT1   "%/%R%x%# "
 
#define DEFAULT_PROMPT2   "%/%R%x%# "
 
#define DEFAULT_PROMPT3   ">> "
 
#define EXIT_SUCCESS   0
 
#define EXIT_FAILURE   1
 
#define EXIT_BADCONN   2
 
#define EXIT_USER   3
 

Typedefs

typedef struct _psqlSettings PsqlSettings
 

Enumerations

enum  PSQL_ECHO { PSQL_ECHO_NONE , PSQL_ECHO_QUERIES , PSQL_ECHO_ERRORS , PSQL_ECHO_ALL }
 
enum  PSQL_ECHO_HIDDEN { PSQL_ECHO_HIDDEN_OFF , PSQL_ECHO_HIDDEN_ON , PSQL_ECHO_HIDDEN_NOEXEC }
 
enum  PSQL_ERROR_ROLLBACK { PSQL_ERROR_ROLLBACK_OFF , PSQL_ERROR_ROLLBACK_INTERACTIVE , PSQL_ERROR_ROLLBACK_ON }
 
enum  PSQL_COMP_CASE { PSQL_COMP_CASE_PRESERVE_UPPER , PSQL_COMP_CASE_PRESERVE_LOWER , PSQL_COMP_CASE_UPPER , PSQL_COMP_CASE_LOWER }
 
enum  PSQL_SEND_MODE {
  PSQL_SEND_QUERY , PSQL_SEND_EXTENDED_CLOSE , PSQL_SEND_EXTENDED_PARSE , PSQL_SEND_EXTENDED_QUERY_PARAMS ,
  PSQL_SEND_EXTENDED_QUERY_PREPARED
}
 
enum  HistControl { hctl_none = 0 , hctl_ignorespace = 1 , hctl_ignoredups = 2 , hctl_ignoreboth = hctl_ignorespace | hctl_ignoredups }
 
enum  trivalue {
  TRI_DEFAULT , TRI_NO , TRI_YES , TRI_DEFAULT ,
  TRI_NO , TRI_YES , TRI_DEFAULT , TRI_NO ,
  TRI_YES , TRI_DEFAULT , TRI_NO , TRI_YES
}
 

Variables

PsqlSettings pset
 

Macro Definition Documentation

◆ DEFAULT_CSV_FIELD_SEP

#define DEFAULT_CSV_FIELD_SEP   ','

Definition at line 14 of file settings.h.

◆ DEFAULT_EDITOR

#define DEFAULT_EDITOR   "vi"

Definition at line 22 of file settings.h.

◆ DEFAULT_EDITOR_LINENUMBER_ARG

#define DEFAULT_EDITOR_LINENUMBER_ARG   "+"

Definition at line 23 of file settings.h.

◆ DEFAULT_FIELD_SEP

#define DEFAULT_FIELD_SEP   "|"

Definition at line 15 of file settings.h.

◆ DEFAULT_PROMPT1

#define DEFAULT_PROMPT1   "%/%R%x%# "

Definition at line 26 of file settings.h.

◆ DEFAULT_PROMPT2

#define DEFAULT_PROMPT2   "%/%R%x%# "

Definition at line 27 of file settings.h.

◆ DEFAULT_PROMPT3

#define DEFAULT_PROMPT3   ">> "

Definition at line 28 of file settings.h.

◆ DEFAULT_RECORD_SEP

#define DEFAULT_RECORD_SEP   "\n"

Definition at line 16 of file settings.h.

◆ EXIT_BADCONN

#define EXIT_BADCONN   2

Definition at line 181 of file settings.h.

◆ EXIT_FAILURE

#define EXIT_FAILURE   1

Definition at line 178 of file settings.h.

◆ EXIT_SUCCESS

#define EXIT_SUCCESS   0

Definition at line 174 of file settings.h.

◆ EXIT_USER

#define EXIT_USER   3

Definition at line 183 of file settings.h.

Typedef Documentation

◆ PsqlSettings

typedef struct _psqlSettings PsqlSettings

Enumeration Type Documentation

◆ HistControl

Enumerator
hctl_none 
hctl_ignorespace 
hctl_ignoredups 
hctl_ignoreboth 

Definition at line 74 of file settings.h.

75 {
76  hctl_none = 0,
77  hctl_ignorespace = 1,
78  hctl_ignoredups = 2,
80 } HistControl;
HistControl
Definition: settings.h:75
@ hctl_ignoredups
Definition: settings.h:78
@ hctl_ignoreboth
Definition: settings.h:79
@ hctl_none
Definition: settings.h:76
@ hctl_ignorespace
Definition: settings.h:77

◆ PSQL_COMP_CASE

Enumerator
PSQL_COMP_CASE_PRESERVE_UPPER 
PSQL_COMP_CASE_PRESERVE_LOWER 
PSQL_COMP_CASE_UPPER 
PSQL_COMP_CASE_LOWER 

Definition at line 57 of file settings.h.

58 {
PSQL_COMP_CASE
Definition: settings.h:58
@ PSQL_COMP_CASE_PRESERVE_LOWER
Definition: settings.h:60
@ PSQL_COMP_CASE_LOWER
Definition: settings.h:62
@ PSQL_COMP_CASE_PRESERVE_UPPER
Definition: settings.h:59
@ PSQL_COMP_CASE_UPPER
Definition: settings.h:61

◆ PSQL_ECHO

enum PSQL_ECHO
Enumerator
PSQL_ECHO_NONE 
PSQL_ECHO_QUERIES 
PSQL_ECHO_ERRORS 
PSQL_ECHO_ALL 

Definition at line 35 of file settings.h.

36 {
41 } PSQL_ECHO;
PSQL_ECHO
Definition: settings.h:36
@ PSQL_ECHO_ALL
Definition: settings.h:40
@ PSQL_ECHO_ERRORS
Definition: settings.h:39
@ PSQL_ECHO_NONE
Definition: settings.h:37
@ PSQL_ECHO_QUERIES
Definition: settings.h:38

◆ PSQL_ECHO_HIDDEN

Enumerator
PSQL_ECHO_HIDDEN_OFF 
PSQL_ECHO_HIDDEN_ON 
PSQL_ECHO_HIDDEN_NOEXEC 

Definition at line 43 of file settings.h.

44 {
PSQL_ECHO_HIDDEN
Definition: settings.h:44
@ PSQL_ECHO_HIDDEN_NOEXEC
Definition: settings.h:47
@ PSQL_ECHO_HIDDEN_OFF
Definition: settings.h:45
@ PSQL_ECHO_HIDDEN_ON
Definition: settings.h:46

◆ PSQL_ERROR_ROLLBACK

Enumerator
PSQL_ERROR_ROLLBACK_OFF 
PSQL_ERROR_ROLLBACK_INTERACTIVE 
PSQL_ERROR_ROLLBACK_ON 

Definition at line 50 of file settings.h.

51 {
PSQL_ERROR_ROLLBACK
Definition: settings.h:51
@ PSQL_ERROR_ROLLBACK_INTERACTIVE
Definition: settings.h:53
@ PSQL_ERROR_ROLLBACK_ON
Definition: settings.h:54
@ PSQL_ERROR_ROLLBACK_OFF
Definition: settings.h:52

◆ PSQL_SEND_MODE

Enumerator
PSQL_SEND_QUERY 
PSQL_SEND_EXTENDED_CLOSE 
PSQL_SEND_EXTENDED_PARSE 
PSQL_SEND_EXTENDED_QUERY_PARAMS 
PSQL_SEND_EXTENDED_QUERY_PREPARED 

Definition at line 65 of file settings.h.

66 {
PSQL_SEND_MODE
Definition: settings.h:66
@ PSQL_SEND_QUERY
Definition: settings.h:67
@ PSQL_SEND_EXTENDED_QUERY_PARAMS
Definition: settings.h:70
@ PSQL_SEND_EXTENDED_PARSE
Definition: settings.h:69
@ PSQL_SEND_EXTENDED_CLOSE
Definition: settings.h:68
@ PSQL_SEND_EXTENDED_QUERY_PREPARED
Definition: settings.h:71

◆ trivalue

enum trivalue
Enumerator
TRI_DEFAULT 
TRI_NO 
TRI_YES 
TRI_DEFAULT 
TRI_NO 
TRI_YES 
TRI_DEFAULT 
TRI_NO 
TRI_YES 
TRI_DEFAULT 
TRI_NO 
TRI_YES 

Definition at line 82 of file settings.h.

83 {
85  TRI_NO,
86  TRI_YES,
87 };
@ TRI_YES
Definition: settings.h:86
@ TRI_DEFAULT
Definition: settings.h:84
@ TRI_NO
Definition: settings.h:85

Variable Documentation

◆ pset

PsqlSettings pset
extern

Definition at line 32 of file startup.c.

Referenced by AcceptResult(), autocommit_hook(), CheckConnection(), clean_extended_state(), ClearOrSaveAllResults(), ClearOrSaveResult(), command_no_begin(), comp_keyword_case_hook(), connection_warnings(), ConnectionUp(), describeAccessMethods(), describeAggregates(), describeConfigurationParameters(), describeFunctions(), describeOneTableDetails(), describeOneTSConfig(), describeOneTSParser(), describeOperators(), describePublications(), DescribeQuery(), describeRoleGrants(), describeRoles(), describeSubscriptions(), describeTableDetails(), describeTablespaces(), describeTypes(), do_connect(), do_copy(), do_lo_export(), do_lo_import(), do_lo_unlink(), do_pset(), do_watch(), echo_hidden_command(), echo_hidden_hook(), echo_hook(), EstablishVariableSpace(), exec_command(), exec_command_a(), exec_command_bind(), exec_command_bind_named(), exec_command_C(), exec_command_close(), exec_command_conninfo(), exec_command_crosstabview(), exec_command_echo(), exec_command_encoding(), exec_command_errverbose(), exec_command_f(), exec_command_g(), exec_command_gdesc(), exec_command_getenv(), exec_command_gexec(), exec_command_gset(), exec_command_help(), exec_command_html(), exec_command_parse(), exec_command_password(), exec_command_print(), exec_command_prompt(), exec_command_pset(), exec_command_reset(), exec_command_s(), exec_command_set(), exec_command_sf_sv(), exec_command_slash_command_help(), exec_command_t(), exec_command_T(), exec_command_timing(), exec_command_unset(), exec_command_x(), ExecQueryAndProcessResults(), ExecQueryTuples(), fail_lo_xact(), fetch_count_hook(), finish_lo_xact(), finishInput(), get_create_object_cmd(), get_prompt(), handleCopyIn(), HandleCopyResult(), HandleSlashCmds(), hide_compression_hook(), hide_tableam_hook(), histcontrol_hook(), histsize_hook(), ignoreeof_hook(), indexOfColumn(), initializeInput(), is_superuser(), listAllDbs(), listCasts(), listCollations(), listConversions(), listDbRoleSettings(), listDefaultACLs(), listDomains(), listEventTriggers(), listExtendedStats(), listExtensionContents(), listExtensions(), listForeignDataWrappers(), listForeignServers(), listForeignTables(), listLanguages(), listLargeObjects(), listOneExtensionContents(), listOperatorClasses(), listOperatorFamilies(), listOpFamilyFunctions(), listOpFamilyOperators(), listPartitionedTables(), listPublications(), listSchemas(), listTables(), listTSConfigs(), listTSConfigsVerbose(), listTSDictionaries(), listTSParsers(), listTSParsersVerbose(), listTSTemplates(), listUserMappings(), log_locus_callback(), log_pre_callback(), lookup_object_oid(), main(), MainLoop(), objectDescription(), on_error_rollback_hook(), on_error_stop_hook(), parse_psql_options(), parse_slash_copy(), permissionsList(), pg_send_history(), print_lo_result(), printCrosstab(), printGSSInfo(), printHistory(), PrintNotifications(), PrintQueryResult(), PrintQueryStatus(), PrintQueryTuples(), PrintResultInCrosstab(), printSSLInfo(), process_command_g_options(), process_file(), prompt1_hook(), prompt2_hook(), prompt3_hook(), psql_get_variable(), PSQLexec(), PSQLexecWatch(), quiet_hook(), SendQuery(), session_username(), setQFout(), SetResultVariables(), SetShellResultVariables(), SetupGOutput(), show_all_results_hook(), show_context_hook(), singleline_hook(), singlestep_hook(), skip_white_space(), slashUsage(), standard_strings(), start_lo_xact(), StoreQueryTuple(), SyncVariables(), UnsyncVariables(), usage(), validateSQLNamePattern(), and verbosity_hook().