On 2020-03-09 15:55, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> On 2020-03-01 23:51, Tom Lane wrote:
>>> In general, while I'm on board with the idea, I wonder whether it
>>> wouldn't be smarter to keep on defining PG_MAJORVERSION as a string,
>>> and just add PG_MAJORVERSION_NUM alongside of it.
>
>> Agreed. Here is another patch.
>
> This version LGTM. (I can't actually test the Windows aspects
> of this, but I assume you did.)
committed
> I'm wondering a little bit whether it'd be worth back-patching the
> additions of the new #defines. That would cut about five years off
> the time till they could be relied on by extensions. However,
> I'm not sure anyone is eager to rely on them, so it may not be
> worth the effort.
I doubt external code really needs these symbols. You can always use
PG_VERSION_NUM.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services