PostgreSQL Source Code  git master
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  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 165 of file settings.h.

◆ EXIT_FAILURE

#define EXIT_FAILURE   1

Definition at line 162 of file settings.h.

◆ EXIT_SUCCESS

#define EXIT_SUCCESS   0

Definition at line 158 of file settings.h.

◆ EXIT_USER

#define EXIT_USER   3

Definition at line 167 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 65 of file settings.h.

66 {
67  hctl_none = 0,
68  hctl_ignorespace = 1,
69  hctl_ignoredups = 2,
71 } HistControl;
HistControl
Definition: settings.h:66
@ hctl_ignoredups
Definition: settings.h:69
@ hctl_ignoreboth
Definition: settings.h:70
@ hctl_none
Definition: settings.h:67
@ hctl_ignorespace
Definition: settings.h:68

◆ 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

◆ 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 73 of file settings.h.

74 {
76  TRI_NO,
77  TRI_YES
78 };
@ TRI_YES
Definition: settings.h:77
@ TRI_DEFAULT
Definition: settings.h:75
@ TRI_NO
Definition: settings.h:76

Variable Documentation

◆ pset

PsqlSettings pset
extern

Definition at line 32 of file startup.c.

Referenced by AcceptResult(), autocommit_hook(), CheckConnection(), ClearOrSaveResult(), command_no_begin(), comp_keyword_case_hook(), connection_warnings(), ConnectionUp(), describeAccessMethods(), describeAggregates(), describeFunctions(), describeOneTableDetails(), describeOneTSConfig(), describeOneTSParser(), describeOperators(), describePublications(), DescribeQuery(), describeRoles(), describeSubscriptions(), describeTableDetails(), describeTablespaces(), describeTypes(), do_connect(), do_copy(), do_lo_export(), do_lo_import(), do_lo_list(), do_lo_unlink(), do_pset(), do_watch(), echo_hidden_command(), echo_hidden_hook(), echo_hook(), EstablishVariableSpace(), exec_command(), exec_command_a(), exec_command_C(), exec_command_conninfo(), exec_command_crosstabview(), exec_command_echo(), exec_command_ef_ev(), exec_command_encoding(), exec_command_errverbose(), exec_command_f(), exec_command_g(), exec_command_gdesc(), exec_command_gexec(), exec_command_gset(), exec_command_help(), exec_command_html(), 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(), ExecQueryTuples(), ExecQueryUsingCursor(), fail_lo_xact(), fetch_count_hook(), finish_lo_xact(), finishInput(), get_create_object_cmd(), get_prompt(), handleCopyIn(), HandleSlashCmds(), helpSQL(), helpVariables(), hide_compression_hook(), hide_tableam_hook(), histcontrol_hook(), histsize_hook(), ignoreeof_hook(), indexOfColumn(), initializeInput(), is_select_command(), is_superuser(), listAllDbs(), listCasts(), listCollations(), listConversions(), listDbRoleSettings(), listDefaultACLs(), listDomains(), listEventTriggers(), listExtendedStats(), listExtensionContents(), listExtensions(), listForeignDataWrappers(), listForeignServers(), listForeignTables(), listLanguages(), 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(), printACLColumn(), printCrosstab(), printGSSInfo(), printHistory(), PrintNotifications(), PrintQueryResults(), PrintQueryStatus(), PrintQueryTuples(), PrintResultsInCrosstab(), printSSLInfo(), process_command_g_options(), process_file(), ProcessResult(), prompt1_hook(), prompt2_hook(), prompt3_hook(), psql_get_variable(), PSQLexec(), PSQLexecWatch(), quiet_hook(), SendQuery(), session_username(), setQFout(), SetResultVariables(), show_context_hook(), singleline_hook(), singlestep_hook(), skip_white_space(), slashUsage(), standard_strings(), start_lo_xact(), StoreQueryTuple(), SyncVariables(), UnsyncVariables(), usage(), and verbosity_hook().