Peter Eisentraut <peter_e@gmx.net> writes:
> Shell variables did serve as a design model, mostly because I found it
> better to use *some* model rather than inventing behavior out of thin
> air. Consequently, I am sort of biased on this.
It does seem worth pointing out that shell variables have acted the way
they do for a long time. I haven't heard all that many people
complaining about it, so I'm unconvinced that the behavior is broken.
I'm definitely against breaking backwards compatibility to improve it
in psql.
I might be willing to support an optional (not-default) mode with more
error checking, though. What did you think of the "\declare foo" idea?
regards, tom lane