On Fri, Feb 3, 2017 at 4:24 PM, Corey Huinker <corey.huin...@gmail.com> wrote: > That might be what we end up doing. I'm willing to see how unwieldy it gets > before rolling back to "endif: peace out".
All I'm saying is, give peace a chance. :-) > The state logic has stuff to do anyway, so for the moment I've added > psql_error() messages at each endpoint. My current (unsubmitted) work has: > > if you were in a true branch and leave it (i.e yes->yes) > > + psql_error("exited \\if to true > parent branch, \n" > + "continuing > executing commands\n"); > > if you were in a false branch beneath a true branch and leave it (no->yes) > > + psql_error("exited \\if to true > parent branch, \n" > + "resuming executing > commands\n"); > > And if you were in a branch that was a child of a false branch (no->no): > > + psql_error("exited \\if to false parent > branch, \n" > + "ignoring commands until > next \\endif\n"); > > And the (yes->no) is an impossibility, so no message there. > > I'm not too concerned about what wording we finally go with, and as the > coder I realize I'm too close to know the wording that will be most helpful > to an outsider, so I'm very much trusting others to guide me. But by far the most likely case is that you are not under another \if at all, and none of these messages are really apropos for that case. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers