Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing serverversion and psql version.
| От | Fabien COELHO |
|---|---|
| Тема | Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing serverversion and psql version. |
| Дата | |
| Msg-id | alpine.DEB.2.20.1709051857100.17848@lancre обсуждение исходный текст |
| Ответ на | Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing server version and psql version. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
>> 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. -- Fabien.
В списке pgsql-hackers по дате отправления: