|
|
@ -3560,21 +3560,15 @@ _align2string(enum printFormat in) |
|
|
|
case PRINT_NOTHING: |
|
|
|
case PRINT_NOTHING: |
|
|
|
return "nothing"; |
|
|
|
return "nothing"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case PRINT_UNALIGNED: |
|
|
|
|
|
|
|
return "unaligned"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case PRINT_ALIGNED: |
|
|
|
case PRINT_ALIGNED: |
|
|
|
return "aligned"; |
|
|
|
return "aligned"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case PRINT_WRAPPED: |
|
|
|
case PRINT_ASCIIDOC: |
|
|
|
return "wrapped"; |
|
|
|
return "asciidoc"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case PRINT_HTML: |
|
|
|
case PRINT_HTML: |
|
|
|
return "html"; |
|
|
|
return "html"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case PRINT_ASCIIDOC: |
|
|
|
|
|
|
|
return "asciidoc"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case PRINT_LATEX: |
|
|
|
case PRINT_LATEX: |
|
|
|
return "latex"; |
|
|
|
return "latex"; |
|
|
|
break; |
|
|
|
break; |
|
|
@ -3584,6 +3578,12 @@ _align2string(enum printFormat in) |
|
|
|
case PRINT_TROFF_MS: |
|
|
|
case PRINT_TROFF_MS: |
|
|
|
return "troff-ms"; |
|
|
|
return "troff-ms"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case PRINT_UNALIGNED: |
|
|
|
|
|
|
|
return "unaligned"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case PRINT_WRAPPED: |
|
|
|
|
|
|
|
return "wrapped"; |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return "unknown"; |
|
|
|
return "unknown"; |
|
|
|
} |
|
|
|
} |
|
|
@ -3639,25 +3639,25 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!value) |
|
|
|
if (!value) |
|
|
|
; |
|
|
|
; |
|
|
|
else if (pg_strncasecmp("unaligned", value, vallen) == 0) |
|
|
|
|
|
|
|
popt->topt.format = PRINT_UNALIGNED; |
|
|
|
|
|
|
|
else if (pg_strncasecmp("aligned", value, vallen) == 0) |
|
|
|
else if (pg_strncasecmp("aligned", value, vallen) == 0) |
|
|
|
popt->topt.format = PRINT_ALIGNED; |
|
|
|
popt->topt.format = PRINT_ALIGNED; |
|
|
|
else if (pg_strncasecmp("wrapped", value, vallen) == 0) |
|
|
|
|
|
|
|
popt->topt.format = PRINT_WRAPPED; |
|
|
|
|
|
|
|
else if (pg_strncasecmp("html", value, vallen) == 0) |
|
|
|
|
|
|
|
popt->topt.format = PRINT_HTML; |
|
|
|
|
|
|
|
else if (pg_strncasecmp("asciidoc", value, vallen) == 0) |
|
|
|
else if (pg_strncasecmp("asciidoc", value, vallen) == 0) |
|
|
|
popt->topt.format = PRINT_ASCIIDOC; |
|
|
|
popt->topt.format = PRINT_ASCIIDOC; |
|
|
|
|
|
|
|
else if (pg_strncasecmp("html", value, vallen) == 0) |
|
|
|
|
|
|
|
popt->topt.format = PRINT_HTML; |
|
|
|
else if (pg_strncasecmp("latex", value, vallen) == 0) |
|
|
|
else if (pg_strncasecmp("latex", value, vallen) == 0) |
|
|
|
popt->topt.format = PRINT_LATEX; |
|
|
|
popt->topt.format = PRINT_LATEX; |
|
|
|
else if (pg_strncasecmp("latex-longtable", value, vallen) == 0) |
|
|
|
else if (pg_strncasecmp("latex-longtable", value, vallen) == 0) |
|
|
|
popt->topt.format = PRINT_LATEX_LONGTABLE; |
|
|
|
popt->topt.format = PRINT_LATEX_LONGTABLE; |
|
|
|
else if (pg_strncasecmp("troff-ms", value, vallen) == 0) |
|
|
|
else if (pg_strncasecmp("troff-ms", value, vallen) == 0) |
|
|
|
popt->topt.format = PRINT_TROFF_MS; |
|
|
|
popt->topt.format = PRINT_TROFF_MS; |
|
|
|
|
|
|
|
else if (pg_strncasecmp("unaligned", value, vallen) == 0) |
|
|
|
|
|
|
|
popt->topt.format = PRINT_UNALIGNED; |
|
|
|
|
|
|
|
else if (pg_strncasecmp("wrapped", value, vallen) == 0) |
|
|
|
|
|
|
|
popt->topt.format = PRINT_WRAPPED; |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
psql_error("\\pset: allowed formats are unaligned, aligned, wrapped, html, asciidoc, latex, latex-longtable, troff-ms\n"); |
|
|
|
psql_error("\\pset: allowed formats are aligned, asciidoc, html, latex, latex-longtable, troff-ms, unaligned, wrapped\n"); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|