PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | printTextLineFormat |
struct | printTextFormat |
struct | separator |
struct | printTableOpt |
struct | printTableFooter |
struct | printTableContent |
struct | printQueryOpt |
Macros | |
#define | DEFAULT_PAGER "more" |
Typedefs | |
typedef struct printTextLineFormat | printTextLineFormat |
typedef enum printTextRule | printTextRule |
typedef enum printTextLineWrap | printTextLineWrap |
typedef enum printXheaderWidthType | printXheaderWidthType |
typedef struct printTextFormat | printTextFormat |
typedef enum unicode_linestyle | unicode_linestyle |
typedef struct printTableOpt | printTableOpt |
typedef struct printTableFooter | printTableFooter |
typedef struct printTableContent | printTableContent |
typedef struct printQueryOpt | printQueryOpt |
Enumerations | |
enum | printFormat { PRINT_NOTHING = 0 , PRINT_ALIGNED , PRINT_ASCIIDOC , PRINT_CSV , PRINT_HTML , PRINT_LATEX , PRINT_LATEX_LONGTABLE , PRINT_TROFF_MS , PRINT_UNALIGNED , PRINT_WRAPPED } |
enum | printTextRule { PRINT_RULE_TOP , PRINT_RULE_MIDDLE , PRINT_RULE_BOTTOM , PRINT_RULE_DATA } |
enum | printTextLineWrap { PRINT_LINE_WRAP_NONE , PRINT_LINE_WRAP_WRAP , PRINT_LINE_WRAP_NEWLINE } |
enum | printXheaderWidthType { PRINT_XHEADER_FULL , PRINT_XHEADER_COLUMN , PRINT_XHEADER_PAGE , PRINT_XHEADER_EXACT_WIDTH } |
enum | unicode_linestyle { UNICODE_LINESTYLE_SINGLE = 0 , UNICODE_LINESTYLE_DOUBLE } |
Functions | |
void | disable_sigpipe_trap (void) |
void | restore_sigpipe_trap (void) |
void | set_sigpipe_trap_state (bool ignore) |
FILE * | PageOutput (int lines, const printTableOpt *topt) |
void | ClosePager (FILE *pagerpipe) |
void | html_escaped_print (const char *in, FILE *fout) |
void | printTableInit (printTableContent *const content, const printTableOpt *opt, const char *title, const int ncolumns, const int nrows) |
void | printTableAddHeader (printTableContent *const content, char *header, const bool translate, const char align) |
void | printTableAddCell (printTableContent *const content, char *cell, const bool translate, const bool mustfree) |
void | printTableAddFooter (printTableContent *const content, const char *footer) |
void | printTableSetFooter (printTableContent *const content, const char *footer) |
void | printTableCleanup (printTableContent *const content) |
void | printTable (const printTableContent *cont, FILE *fout, bool is_pager, FILE *flog) |
void | printQuery (const PGresult *result, const printQueryOpt *opt, FILE *fout, bool is_pager, FILE *flog) |
char | column_type_alignment (Oid) |
void | setDecimalLocale (void) |
const printTextFormat * | get_line_style (const printTableOpt *opt) |
void | refresh_utf8format (const printTableOpt *opt) |
Variables | |
PGDLLIMPORT volatile sig_atomic_t | cancel_pressed |
PGDLLIMPORT const printTextFormat | pg_asciiformat |
PGDLLIMPORT const printTextFormat | pg_asciiformat_old |
PGDLLIMPORT printTextFormat | pg_utf8format |
typedef struct printQueryOpt printQueryOpt |
typedef struct printTableContent printTableContent |
typedef struct printTableFooter printTableFooter |
typedef struct printTableOpt printTableOpt |
typedef struct printTextFormat printTextFormat |
typedef struct printTextLineFormat printTextLineFormat |
typedef enum printTextLineWrap printTextLineWrap |
typedef enum printTextRule printTextRule |
typedef enum printXheaderWidthType printXheaderWidthType |
typedef enum unicode_linestyle unicode_linestyle |
enum printFormat |
enum printTextLineWrap |
enum printTextRule |
enum unicode_linestyle |
void ClosePager | ( | FILE * | pagerpipe | ) |
Definition at line 3141 of file print.c.
References _, cancel_pressed, fprintf, restore_sigpipe_trap(), and generate_unaccent_rules::stdout.
Referenced by exec_command_sf_sv(), ExecQueryAndProcessResults(), print_aligned_text(), print_aligned_vertical(), printHistory(), printTable(), slashUsage(), and usage().
char column_type_alignment | ( | Oid | ftype | ) |
void disable_sigpipe_trap | ( | void | ) |
Definition at line 3039 of file print.c.
References pqsignal(), SIG_IGN, and SIGPIPE.
Referenced by do_copy(), do_watch(), exec_command_write(), PageOutput(), and SetupGOutput().
const printTextFormat* get_line_style | ( | const printTableOpt * | opt | ) |
Definition at line 3677 of file print.c.
References printTableOpt::line_style, and pg_asciiformat.
Referenced by print_aligned_text(), print_aligned_vertical(), print_aligned_vertical_line(), printPsetInfo(), and pset_value_string().
void html_escaped_print | ( | const char * | in, |
FILE * | fout | ||
) |
Definition at line 1952 of file print.c.
Referenced by print_html_text(), print_html_vertical(), and PrintQueryStatus().
FILE* PageOutput | ( | int | lines, |
const printTableOpt * | topt | ||
) |
Definition at line 3089 of file print.c.
References DEFAULT_PAGER, disable_sigpipe_trap(), fflush(), printTableOpt::pager, printTableOpt::pager_min_lines, restore_sigpipe_trap(), and generate_unaccent_rules::stdout.
Referenced by exec_command_sf_sv(), ExecQueryAndProcessResults(), IsPagerNeeded(), print_aligned_text(), printHistory(), slashUsage(), and usage().
void printQuery | ( | const PGresult * | result, |
const printQueryOpt * | opt, | ||
FILE * | fout, | ||
bool | is_pager, | ||
FILE * | flog | ||
) |
Definition at line 3549 of file print.c.
References printTableContent::aligns, Assert, cancel_pressed, column_type_alignment(), printQueryOpt::footers, format_numeric_locale(), i, printQueryOpt::n_translate_columns, printTableContent::ncolumns, printTableContent::nrows, printQueryOpt::nullPrint, printTableOpt::numericLocale, PQfname(), PQftype(), PQgetisnull(), PQgetvalue(), PQnfields(), PQntuples(), printTable(), printTableAddCell(), printTableAddFooter(), printTableAddHeader(), printTableCleanup(), printTableInit(), printQueryOpt::title, printQueryOpt::topt, translate(), printQueryOpt::translate_columns, and printQueryOpt::translate_header.
Referenced by describeAccessMethods(), describeAggregates(), describeConfigurationParameters(), describeFunctions(), describeOneTableDetails(), describeOneTSConfig(), describeOneTSParser(), describeOperators(), describeRoleGrants(), describeSubscriptions(), describeTablespaces(), describeTypes(), ExecQueryAndProcessResults(), listAllDbs(), listCasts(), listCollations(), listConversions(), listDbRoleSettings(), listDefaultACLs(), listDomains(), listEventTriggers(), listExtendedStats(), listExtensions(), listForeignDataWrappers(), listForeignServers(), listForeignTables(), listLanguages(), listLargeObjects(), listOneExtensionContents(), listOperatorClasses(), listOperatorFamilies(), listOpFamilyFunctions(), listOpFamilyOperators(), listPartitionedTables(), listPublications(), listSchemas(), listTables(), listTSConfigs(), listTSDictionaries(), listTSParsers(), listTSTemplates(), listUserMappings(), objectDescription(), permissionsList(), and PrintQueryTuples().
void printTable | ( | const printTableContent * | cont, |
FILE * | fout, | ||
bool | is_pager, | ||
FILE * | flog | ||
) |
Definition at line 3443 of file print.c.
References _, cancel_pressed, ClosePager(), exit(), EXIT_FAILURE, printTableOpt::expanded, printTableOpt::format, fprintf, IsPagerNeeded(), printTableContent::opt, PRINT_ALIGNED, print_aligned_text(), print_aligned_vertical(), PRINT_ASCIIDOC, print_asciidoc_text(), print_asciidoc_vertical(), PRINT_CSV, print_csv_text(), print_csv_vertical(), PRINT_HTML, print_html_text(), print_html_vertical(), PRINT_LATEX, PRINT_LATEX_LONGTABLE, print_latex_longtable_text(), print_latex_text(), print_latex_vertical(), PRINT_NOTHING, PRINT_TROFF_MS, print_troff_ms_text(), print_troff_ms_vertical(), PRINT_UNALIGNED, print_unaligned_text(), print_unaligned_vertical(), and PRINT_WRAPPED.
Referenced by describeOneTableDetails(), describePublications(), describeRoles(), printCrosstab(), and printQuery().
void printTableAddCell | ( | printTableContent *const | content, |
char * | cell, | ||
const bool | translate, | ||
const bool | mustfree | ||
) |
Definition at line 3260 of file print.c.
References _, printTableContent::cell, printTableContent::cellmustfree, printTableContent::cellsadded, printTableOpt::encoding, exit(), EXIT_FAILURE, fprintf, if(), mbvalidate(), printTableContent::ncolumns, printTableContent::nrows, printTableContent::opt, pg_malloc0(), and translate().
Referenced by describeOneTableDetails(), describePublications(), describeRoles(), and printQuery().
void printTableAddFooter | ( | printTableContent *const | content, |
const char * | footer | ||
) |
Definition at line 3310 of file print.c.
References printTableFooter::data, printTableContent::footer, printTableContent::footers, printTableFooter::next, pg_malloc0(), and pg_strdup().
Referenced by add_tablespace_footer(), addFooterToPublicationDesc(), describeOneTableDetails(), printQuery(), and printTableSetFooter().
void printTableAddHeader | ( | printTableContent *const | content, |
char * | header, | ||
const bool | translate, | ||
const char | align | ||
) |
Definition at line 3220 of file print.c.
References _, printTableContent::align, printTableOpt::encoding, exit(), EXIT_FAILURE, fprintf, printTableContent::header, printTableContent::headers, mbvalidate(), printTableContent::ncolumns, printTableContent::opt, and translate().
Referenced by describeOneTableDetails(), describePublications(), describeRoles(), printCrosstab(), and printQuery().
void printTableCleanup | ( | printTableContent *const | content | ) |
Definition at line 3353 of file print.c.
References printTableContent::align, printTableContent::aligns, printTableContent::cell, printTableContent::cellmustfree, printTableContent::cells, printTableFooter::data, printTableContent::footer, printTableContent::footers, for(), free, printTableContent::header, printTableContent::headers, i, printTableContent::ncolumns, printTableFooter::next, printTableContent::nrows, printTableContent::opt, printTableContent::title, and unconstify.
Referenced by describeOneTableDetails(), describePublications(), describeRoles(), printCrosstab(), and printQuery().
void printTableInit | ( | printTableContent *const | content, |
const printTableOpt * | opt, | ||
const char * | title, | ||
const int | ncolumns, | ||
const int | nrows | ||
) |
Definition at line 3172 of file print.c.
References _, printTableContent::align, printTableContent::aligns, printTableContent::cell, printTableContent::cellmustfree, printTableContent::cells, printTableContent::cellsadded, exit(), EXIT_FAILURE, printTableContent::footer, printTableContent::footers, fprintf, printTableContent::header, printTableContent::headers, printTableContent::ncolumns, printTableContent::nrows, printTableContent::opt, pg_malloc0(), and printTableContent::title.
Referenced by describeOneTableDetails(), describePublications(), describeRoles(), printCrosstab(), and printQuery().
void printTableSetFooter | ( | printTableContent *const | content, |
const char * | footer | ||
) |
Definition at line 3335 of file print.c.
References printTableFooter::data, printTableContent::footer, printTableContent::footers, free, pg_strdup(), and printTableAddFooter().
Referenced by add_tablespace_footer().
void refresh_utf8format | ( | const printTableOpt * | opt | ) |
Definition at line 3691 of file print.c.
References unicodeStyleFormat::border_style, unicodeStyleFormat::column_style, unicodeStyleColumnFormat::down_and_horizontal, unicodeStyleBorderFormat::down_and_left, unicodeStyleBorderFormat::down_and_right, unicodeStyleFormat::header_nl_left, printTextFormat::header_nl_left, unicodeStyleFormat::header_nl_right, printTextFormat::header_nl_right, unicodeStyleRowFormat::horizontal, unicodeStyleBorderFormat::horizontal, printTextLineFormat::hrule, unicodeStyleBorderFormat::left_and_right, printTextLineFormat::leftvrule, printTextFormat::lrule, printTextLineFormat::midvrule, printTextFormat::midvrule_blank, printTextFormat::midvrule_nl, printTextFormat::midvrule_wrap, printTextFormat::name, unicodeStyleFormat::nl_left, printTextFormat::nl_left, unicodeStyleFormat::nl_right, printTextFormat::nl_right, pg_utf8format, PRINT_RULE_BOTTOM, PRINT_RULE_DATA, PRINT_RULE_MIDDLE, PRINT_RULE_TOP, printTextLineFormat::rightvrule, unicodeStyleFormat::row_style, printTableOpt::unicode_border_linestyle, printTableOpt::unicode_column_linestyle, printTableOpt::unicode_header_linestyle, unicode_style, unicodeStyleColumnFormat::up_and_horizontal, unicodeStyleBorderFormat::up_and_right, unicodeStyleColumnFormat::vertical, unicodeStyleBorderFormat::vertical, unicodeStyleColumnFormat::vertical_and_horizontal, unicodeStyleRowFormat::vertical_and_left, unicodeStyleRowFormat::vertical_and_right, unicodeStyleFormat::wrap_left, printTextFormat::wrap_left, unicodeStyleFormat::wrap_right, printTextFormat::wrap_right, unicodeStyleFormat::wrap_right_border, and printTextFormat::wrap_right_border.
void restore_sigpipe_trap | ( | void | ) |
Definition at line 3062 of file print.c.
References always_ignore_sigpipe, pqsignal(), SIG_DFL, SIG_IGN, and SIGPIPE.
Referenced by CloseGOutput(), ClosePager(), do_copy(), do_watch(), exec_command_write(), PageOutput(), and setQFout().
void set_sigpipe_trap_state | ( | bool | ignore | ) |
Definition at line 3075 of file print.c.
References always_ignore_sigpipe.
Referenced by setQFout().
void setDecimalLocale | ( | void | ) |
Definition at line 3641 of file print.c.
References decimal_point, groupdigits, pg_strdup(), and thousands_sep.
Referenced by main().
|
extern |
Definition at line 43 of file print.c.
Referenced by ClosePager(), describeTableDetails(), do_watch(), ExecQueryAndProcessResults(), ExecQueryTuples(), listExtensionContents(), listTSConfigsVerbose(), listTSParsersVerbose(), MainLoop(), print_aligned_text(), print_aligned_vertical(), print_asciidoc_text(), print_asciidoc_vertical(), print_csv_text(), print_csv_vertical(), print_html_text(), print_html_vertical(), print_latex_longtable_text(), print_latex_text(), print_latex_vertical(), print_troff_ms_text(), print_troff_ms_vertical(), print_unaligned_text(), print_unaligned_vertical(), printQuery(), printTable(), PrintVariables(), psql_cancel_callback(), SendQuery(), and wait_until_connected().
|
extern |
Definition at line 56 of file print.c.
Referenced by do_pset(), and get_line_style().
|
extern |
Definition at line 77 of file print.c.
Referenced by do_pset(), and print_aligned_vertical().
|
extern |
Definition at line 99 of file print.c.
Referenced by do_pset(), and refresh_utf8format().