Re: Determine server version from psql script - Mailing list pgsql-general

From David G. Johnston
Subject Re: Determine server version from psql script
Date
Msg-id CAKFQuwZ1=Mi_w-Wt4AkOSO1M+CD-Tg-W7O+9rJb-Fp7Q884fHQ@mail.gmail.com
Whole thread Raw
In response to Re: Determine server version from psql script  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Determine server version from psql script
List pgsql-general
On Sunday, March 23, 2025, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hi

ne 23. 3. 2025 v 19:31 odesílatel Igor Korot <ikorot01@gmail.com> napsal:
Hi,

[code]
SELECT current_setting('server_version_num')::int > 130000 as v13
 
SELECT current_setting('server_version_num')::int > =140000 as v14

IOW, you can’t use >130000 because that will match v13.1 which is 130001 in integer format.

David J.

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Determine server version from psql script
Next
From: Igor Korot
Date:
Subject: Re: Determine server version from psql script