Re: Better error message when --single is not the first arg to postgres executable
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>,
Peter Eisentraut <peter@eisentraut.org>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-12-03T18:01:29Z
Lists: pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> Here's what I have staged for commit.
In addition to Alvaro's comments:
+/* special must-be-first options for dispatching to various subprograms */
+typedef enum Subprogram
+{
+ SUBPROGRAM_CHECK,
+ ... etc
"Subprogram" doesn't quite seem like the right name for this enum.
These are not subprograms, they are options. I'm not feeling
especially inventive today, so this might be a lousy suggestion,
but how about
typedef enum DispatchOption
{
DISPATCH_CHECK,
... etc
Also, I think our usual convention for annotating a special
last entry is more like
+ SUBPROGRAM_SINGLE,
+ SUBPROGRAM_POSTMASTER, /* must be last */
+} Subprogram;
I don't like the comment with "above" because it's not
very clear above what.
regards, tom lane
Commits
-
Provide a better error message for misplaced dispatch options.
- 76fd34249661 18.0 landed