diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-02-09 20:15:48 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-02-09 20:20:15 +0200 |
commit | 169c8a911260bd5a8b6910c458afa57a1ae29627 (patch) | |
tree | bfd5b4ee2f9ab327fa19337492b36794b3f31d25 /src/bin/psql/print.h | |
parent | dd7c84185c160bb0d95bd265182f24f1f6c21924 (diff) |
psql: Support zero byte field and record separators
Add new psql settings and command-line options to support setting the
field and record separators for unaligned output to a zero byte, for
easier interfacing with other shell tools.
reviewed by Abhijit Menon-Sen
Diffstat (limited to 'src/bin/psql/print.h')
-rw-r--r-- | src/bin/psql/print.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h index 86c6e754abd..931535e478f 100644 --- a/src/bin/psql/print.h +++ b/src/bin/psql/print.h @@ -67,6 +67,12 @@ typedef struct printTextFormat * marks when border=0? */ } printTextFormat; +struct separator +{ + char *separator; + bool separator_zero; +}; + typedef struct printTableOpt { enum printFormat format; /* see enum above */ @@ -81,8 +87,8 @@ typedef struct printTableOpt bool stop_table; /* print stop decoration, eg </table> */ unsigned long prior_records; /* start offset for record counters */ const printTextFormat *line_style; /* line style (NULL for default) */ - char *fieldSep; /* field separator for unaligned text mode */ - char *recordSep; /* record separator for unaligned text mode */ + struct separator fieldSep; /* field separator for unaligned text mode */ + struct separator recordSep; /* record separator for unaligned text mode */ bool numericLocale; /* locale-aware numeric units separator and * decimal marker */ char *tableAttr; /* attributes for HTML <table ...> */ |