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

From Greg Sabino Mullane
Subject Re: Better error message when --single is not the first arg to postgres executable
Date
Msg-id CAKAnmmJ4m6Hup4Q8mft6Xyo8KN4TQi7r6340k=Yr=rif+5vUow@mail.gmail.com
Whole thread Raw
In response to Better error message when --single is not the first arg to postgres executable  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-hackers
I'm not opposed to this new method, as long as the error code improves. :)

+typedef enum Subprogram
+{
+ SUBPROGRAM_CHECK,
+ SUBPROGRAM_BOOT,
+#ifdef EXEC_BACKEND
+ SUBPROGRAM_FORKCHILD,
+#endif

I'm not happy about making this and the const char[] change their structure based on the ifdefs - could we not just leave forkchild in? Their usage is already protected by the ifdefs in the calling code.

Heck, we could put SUBPROGRAM_FORKCHILD first in the list, keep the ifdef in parse_subprogram, and start regular checking with i = 1;
This would reduce to a single #ifdef

Cheers,
Greg

pgsql-hackers by date:

Previous
From: Tobias Hoffmann
Date:
Subject: Re: Non-trivial condition is only propagated to one side of JOIN
Next
From: Tom Lane
Date:
Subject: Re: Non-trivial condition is only propagated to one side of JOIN