public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Igor Korot <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Determine server version from psql script
Date: Sat, 22 Mar 2025 17:42:43 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+FnnTyWEsYi=_QTeSXoGXd7Fkd8C7_AnCc5=hho-DZF9_iunQ@mail.gmail.com>
References: <CA+FnnTyWEsYi=_QTeSXoGXd7Fkd8C7_AnCc5=hho-DZF9_iunQ@mail.gmail.com>
On 3/22/25 17:31, Igor Korot wrote:
> Hi, All,
> I have a big script that populated the DB for me.
The language used for the script?
Is it actually running in psql?
>
> I made it based on the latest available version.
>
> However, i have version 13 installed on my Linux box and so trying to
> execute "CREATE OR REPLACE TRIGGER..." will fail.
>
> Is there a way to determine the server version from such a script?
From here:
https://www.postgresql.org/docs/13/runtime-config-preset.html#GUC-SERVER-VERSION-NUM
show server_version_num;
Though how you use that is going to depend on the answers to the first
two questions.
>
> Thank you.
>
--
Adrian Klaver
[email protected]
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Determine server version from psql script
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox