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

From Tom Lane
Subject Re: Determine server version from psql script
Date
Msg-id 460947.1742691551@sss.pgh.pa.us
Whole thread Raw
In response to Re: Determine server version from psql script  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 3/22/25 17:31, Igor Korot wrote:
>> Is there a way to determine the server version from such a script?

> show server_version_num;

psql already populates its SERVER_VERSION_NUM variable from that
for you.

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Determine server version from psql script
Next
From: Tom Lane
Date:
Subject: Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000