aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2014-08-12 11:12:16 +0200
committerAndres Freund <andres@anarazel.de>2014-08-12 13:06:34 +0200
commit596385be06e1c8ac7291958a556b10b37ee333d5 (patch)
treee2d9e712a61d8cba606a22364901fa51e6643018 /src
parentd6ded369a7793c926661f492c153a6dd05afc5bc (diff)
downloadpostgresql-596385be06e1c8ac7291958a556b10b37ee333d5.tar.gz
postgresql-596385be06e1c8ac7291958a556b10b37ee333d5.zip
pg_recvlogical message and code improvements.
Some error messages complained about --init and --stop being used whereas the --create and --drop are the correct verbs. Fix that. Also a XLogRecPtr was tested in a boolean fashion instead of being compared to InvalidXLogRecPtr. Backpatch to 9.4 where pg_recvlogical was introduced. Michael Paquier
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_basebackup/pg_recvlogical.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
index dbc002d18e0..f3b0f34fce9 100644
--- a/src/bin/pg_basebackup/pg_recvlogical.c
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -814,15 +814,15 @@ main(int argc, char **argv)
if (do_drop_slot && (do_create_slot || do_start_slot))
{
- fprintf(stderr, _("%s: cannot use --init or --start together with --stop\n"), progname);
+ fprintf(stderr, _("%s: cannot use --create or --start together with --drop\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
progname);
exit(1);
}
- if (startpos && (do_create_slot || do_drop_slot))
+ if (startpos != InvalidXLogRecPtr && (do_create_slot || do_drop_slot))
{
- fprintf(stderr, _("%s: cannot use --init or --stop together with --startpos\n"), progname);
+ fprintf(stderr, _("%s: cannot use --create or --drop together with --startpos\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
progname);
exit(1);