From 3e56a632d174c4844923d419a3d9a5a9dbdb1101 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Sun, 22 Oct 2017 20:06:17 +0200 Subject: [PATCH] Add list of types supported by -D to help output Also fix a few typos, and fix indentation of help text. --- README.pg_filedump | 6 +++--- pg_filedump.c | 21 +++++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/README.pg_filedump b/README.pg_filedump index bc34781..b3b24fa 100644 --- a/README.pg_filedump +++ b/README.pg_filedump @@ -71,7 +71,7 @@ The following options are valid for heap and index files: off all formatting options) -d Display formatted block content dump (Option will turn off all other formatting options) - -D Try to decode tuples using given comma separated list of types. + -D Decode tuples using given comma separated list of types. List of supported types: * bigint * bigserial @@ -96,11 +96,11 @@ The following options are valid for heap and index files: * timestamp * timetz * uuid - * varchar + * varchar * varcharN -- varchar(n) * xid * xml - * ~ -- ignores are attributes left in a tuple + * ~ -- ignores all attributes left in a tuple -f Display formatted block content dump along with interpretation -h Display this information -i Display interpreted item details diff --git a/pg_filedump.c b/pg_filedump.c index 3e89af5..e704214 100644 --- a/pg_filedump.c +++ b/pg_filedump.c @@ -106,26 +106,31 @@ DisplayOptions(unsigned int validOptions) printf ("\nUsage: pg_filedump [-abcdfhikxy] [-R startblock [endblock]] [-D attrlist] [-S blocksize] [-s segsize] [-n segnumber] file\n\n" - "Display formatted contents of a PostgreSQL heap/index/control file\n" - "Defaults are: relative addressing, range of the entire file, block\n" + "Display formatted contents of a PostgreSQL heap/index/control file\n" + "Defaults are: relative addressing, range of the entire file, block\n" " size as listed on block 0 in the file\n\n" "The following options are valid for heap and index files:\n" " -a Display absolute addresses when formatting (Block header\n" " information is always block relative)\n" - " -b Display binary block images within a range (Option will turn\n" + " -b Display binary block images within a range (Option will turn\n" " off all formatting options)\n" " -d Display formatted block content dump (Option will turn off\n" " all other formatting options)\n" - " -D Try to decode tuples using given comma separated list of types.\n" - " For full list of supported attribyte types see README file.\n" - " -f Display formatted block content dump along with interpretation\n" + " -D Decode tuples using given comma separated list of types\n" + " Supported types:\n" + " bigint bigserial bool char charN date float float4 float8 int\n" + " json macaddr name oid real serial smallint smallserial text\n" + " time timestamp timetz uuid varchar varcharN xid xml\n" + " ~ ignores all attributes left in a tuple\n" + " -f Display formatted block content dump along with interpretation\n" " -h Display this information\n" " -i Display interpreted item details\n" " -k Verify block checksums\n" " -R Display specific block ranges within the file (Blocks are\n" - " indexed from 0)\n" " [startblock]: block to start at\n" + " indexed from 0)\n" + " [startblock]: block to start at\n" " [endblock]: block to end at\n" - " A startblock without an endblock will format the single block\n" + " A startblock without an endblock will format the single block\n" " -s Force segment size to [segsize]\n" " -n Force segment number to [segnumber]\n" " -S Force block size to [blocksize]\n"