format
- Sets the output format to one of unaligned,
- aligned, wrapped,
- html, asciidoc,
+ Sets the output format to one of aligned,
+ asciidoc, html,
latex (uses tabular),
- latex-longtable, or
- troff-ms.
+ latex-longtable, troff-ms,
+ unaligned, or wrapped.
Unique abbreviations are allowed. (That would mean one letter
is enough.)
- The html, asciidoc, latex,
- latex-longtable, and troff-ms
- formats put out tables that are intended to
- be included in documents using the respective mark-up
+ The asciidoc, html,
+ latex, latex-longtable, and
+ troff-ms formats put out tables that are intended
+ to be included in documents using the respective mark-up
language. They are not complete documents! This might not be
necessary in
HTML, but in
LaTeX you must have a complete
case PRINT_NOTHING:
return "nothing";
break;
- case PRINT_UNALIGNED:
- return "unaligned";
- break;
case PRINT_ALIGNED:
return "aligned";
break;
- case PRINT_WRAPPED:
- return "wrapped";
+ case PRINT_ASCIIDOC:
+ return "asciidoc";
break;
case PRINT_HTML:
return "html";
break;
- case PRINT_ASCIIDOC:
- return "asciidoc";
- break;
case PRINT_LATEX:
return "latex";
break;
case PRINT_TROFF_MS:
return "troff-ms";
break;
+ case PRINT_UNALIGNED:
+ return "unaligned";
+ break;
+ case PRINT_WRAPPED:
+ return "wrapped";
+ break;
}
return "unknown";
}
{
if (!value)
;
- else if (pg_strncasecmp("unaligned", value, vallen) == 0)
- popt->topt.format = PRINT_UNALIGNED;
else if (pg_strncasecmp("aligned", value, vallen) == 0)
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)
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)
popt->topt.format = PRINT_LATEX;
else if (pg_strncasecmp("latex-longtable", value, vallen) == 0)
popt->topt.format = PRINT_LATEX_LONGTABLE;
else if (pg_strncasecmp("troff-ms", value, vallen) == 0)
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
{
- 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;
}
}
else if (TailMatchesCS("\\pset", MatchAny))
{
if (TailMatchesCS("format"))
- COMPLETE_WITH_CS("unaligned", "aligned", "wrapped", "html",
- "asciidoc", "latex", "latex-longtable",
- "troff-ms");
+ COMPLETE_WITH_CS("aligned", "asciidoc", "html", "latex",
+ "latex-longtable", "troff-ms", "unaligned",
+ "wrapped");
else if (TailMatchesCS("linestyle"))
COMPLETE_WITH_CS("ascii", "old-ascii", "unicode");
else if (TailMatchesCS("pager"))