Re: Better error message when --single is not the first arg to postgres executable - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Better error message when --single is not the first arg to postgres executable
Date
Msg-id 1850051.1733248889@sss.pgh.pa.us
Whole thread Raw
In response to Re: Better error message when --single is not the first arg to postgres executable  (Greg Sabino Mullane <htamfids@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Remove useless casts to (void *)
Next
From: Robert Haas
Date:
Subject: Re: Windows pg_basebackup unable to create >2GB pg_wal.tar tarballs ("could not close file: Invalid argument" when creating pg_wal.tar of size ~ 2^31 bytes)