diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-06-04 18:51:43 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-06-04 18:51:43 +0300 |
commit | 79e15c7d86d3f781cc390a5a04db18254ce97b79 (patch) | |
tree | ef9aa6e7b3d60c0b1da8ade76807384bf92d9a3a | |
parent | 035a5e1e8c346efe25df6be4627b5f24cc3736b1 (diff) | |
download | postgresql-79e15c7d86d3f781cc390a5a04db18254ce97b79.tar.gz postgresql-79e15c7d86d3f781cc390a5a04db18254ce97b79.zip |
Fix off-by-one in pg_xlogdump -r option.
Because of the bug, -r would not accept the rmgr with the highest ID.
-rw-r--r-- | contrib/pg_xlogdump/pg_xlogdump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pg_xlogdump/pg_xlogdump.c b/contrib/pg_xlogdump/pg_xlogdump.c index 70dc8d15d50..24ca4fa8552 100644 --- a/contrib/pg_xlogdump/pg_xlogdump.c +++ b/contrib/pg_xlogdump/pg_xlogdump.c @@ -75,7 +75,7 @@ print_rmgr_list(void) { int i; - for (i = 0; i < RM_MAX_ID + 1; i++) + for (i = 0; i <= RM_MAX_ID; i++) { printf("%s\n", RmgrDescTable[i].rm_name); } @@ -492,7 +492,7 @@ main(int argc, char **argv) exit(EXIT_SUCCESS); } - for (i = 0; i < RM_MAX_ID; i++) + for (i = 0; i <= RM_MAX_ID; i++) { if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0) { |