| From: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Better error message when --single is not the first arg to postgres executable |
| Date: | 2024-06-05 18:51:05 |
| Message-ID: | CAKAnmmJkZtZAiSryho=gYpbvC7H-HNjEDAh16F3SoC9LPu8rqQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Please find attached a quick patch to prevent this particularly bad error
message for running "postgres", when making the common mistake of
forgetting to put the "--single" option first because you added an earlier
arg (esp. datadir)
Current behavior:
$ ~/pg/bin/postgres -D ~/pg/data --single
2024-06-05 18:30:40.296 GMT [22934] FATAL: --single requires a value
Improved behavior:
$ ~/pg/bin/postgres -D ~/pg/data --single
--single must be first argument.
I applied it for all the "first arg only" flags (boot, check,
describe-config, and fork), as they suffer the same fate.
Cheers,
Greg
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Give-a-more-accurate-error-message-if-single-not-number-one.patch | application/octet-stream | 1.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2024-06-05 19:03:00 | Re: ssl tests fail due to TCP port conflict |
| Previous Message | Tom Lane | 2024-06-05 18:29:00 | Re: question regarding policy for patches to out-of-support branches |