pg_controldata usage

Lists: pgsql-patches
From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: pg_controldata usage
Date: 2004-09-18 15:39:15
Message-ID: Pine.LNX.4.44.0409181732110.9559-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Today "pg_controldata --help" gives this usage info:

| Usage:
| pg_controldata [OPTION]
|
| Options:
| DATADIR show cluster control information for DATADIR
| --help show this help, then exit
| --version output version information, then exit
|
| If no data directory is specified, the environment variable PGDATA
| is used.

I think that the DATADIR part being treated as an option is confusing and
would like to change it to:

| Usage:
| pg_controldata [OPTION] [DATADIR]
|
| Options:
| --help show this help, then exit
| --version output version information, then exit
|
| If no data directory (DATADIR) is specified, the environment variable
| PGDATA is used.

Any opinions?

The patch in itself is trivial, but since this is -patches, here it is:

--- pg_controldata.c 29 Aug 2004 05:06:53 -0000 1.19
+++ pg_controldata.c 18 Sep 2004 15:35:40 -0000
@@ -30,15 +30,14 @@
(
_(
"Usage:\n"
- " %s [OPTION]\n\n"
+ " %s [OPTION] [DATADIR]\n\n"
"Options:\n"
- " DATADIR show cluster control information for DATADIR\n"
" --help show this help, then exit\n"
" --version output version information, then exit\n"
),
progname
);
- printf(_("\nIf no data directory is specified, the environment variable PGDATA\nis used.\n\n"));
+ printf(_("\nIf no data directory (DATADIR) is specified, the environment variable\nPGDATA is used.\n\n"));
printf(_("Report bugs to <pgsql-bugs(at)postgresql(dot)org>.\n"));
}

--
/Dennis Björklund


From: Neil Conway <neilc(at)samurai(dot)com>
To: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_controldata usage
Date: 2004-09-22 01:44:23
Message-ID: 1095817463.16794.3.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Sun, 2004-09-19 at 01:39, Dennis Bjorklund wrote:
> I think that the DATADIR part being treated as an option is confusing

I agree. Barring any objections I'll apply this patch to HEAD within 24
hours.

-Neil


From: Neil Conway <neilc(at)samurai(dot)com>
To: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_controldata usage
Date: 2004-09-23 00:50:55
Message-ID: 1095900655.22485.192.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Sun, 2004-09-19 at 01:39, Dennis Bjorklund wrote:
> I think that the DATADIR part being treated as an option is confusing

Patch applied -- thanks!

-Neil