We could just issue interactive-only warnings when:
- A user types a branching condition command which sets the branch inactive
- A user types a command or query when the current branch is inactive.
The warnings could be specific about state, something like:
psql session is now in an inactive \if branch. No queries will be executed
and only branching commands (\if, \elif, \else, \endif) will be evaluated.
My 0.02€: it looks too verbose, should stay on one short line. Maybe:
(in|)active (\if|\elif|\else), (execut|ignor)ing commands
Although there is some redundancy...
calvin=> \if true
active \if: executing commands
calvin=(t)> \echo ok
inactive \else: skipping commands
Maybe it could be controlled, say based on VERBOSITY setting (which really
controls verbosity of error reports) or some other.
I'm unsure whether it is a good idea, I like terse interfaces, but this is
just an opinion.
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: