This is good. Please can we backpatch these are far as they will go (easily)? There is very little risk in doing so and significant benefits in being able to rely on scripts that know about versions.

Hm.  I think it would be a fine idea to push this change into v10,
so that all psql versions that have \if would have these variables.
However, I'm less enthused about adding them to the 9.x branches.
Given the lack of \if, I'm not seeing a use-case that would justify
taking any compatibility risk for.

Opinions anyone?

I think that it is harmless and useful for v10, and mostly useless for previous versions.

ISTM that the hack looking like:

  \if false \echo BAD VERSION \q \endif

Allow to test a prior 10 version and stop. However testing whether a variable is defined is not included yet, so differenciating between 10 and 11 would not be easy... thus having 10 => version available would be significantly helpful for scripting.


Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to