Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tw9Fx-00BBTE-24 for pgsql-general@arkaria.postgresql.org; Sun, 23 Mar 2025 00:32:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tw9Fv-005afG-Ln for pgsql-general@arkaria.postgresql.org; Sun, 23 Mar 2025 00:31:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tw9Fv-005aTM-8h for pgsql-general@lists.postgresql.org; Sun, 23 Mar 2025 00:31:59 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tw9Ft-000aXd-2C for pgsql-general@lists.postgresql.org; Sun, 23 Mar 2025 00:31:58 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-6ff4faf858cso23080007b3.2 for ; Sat, 22 Mar 2025 17:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742689916; x=1743294716; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Mt957Yff0HUUT1Np9eA/QPDiW2kOqUJZcgZqm/t9cV4=; b=T9UZhuowu3JnXfcWpBPb/eF1PLQGaJmr5AUlZiq4EpiMGzEAOaWGMWGZjcMD35Int5 KgHkIAN/yJKTeJU4Ym7dCzGj3nCKJItWdq/AZ5xZVuQn/ZCdE1Z/rkRYFHphyjoGv/Ve 5knNhr5zes97Bgcgtsve/abf6YRGD2TxVns0PUz1dNXsoTGUxMC4qdcO6JdMXLArYlI6 Dy+ZfaszUXlwBR2ogbSB7a7LEYJqoSH4JAh/9ZhsezM0TcEs4P5nIVxYd21BuesGlHHW /drMgSgrhYdP/T6wEDLKEhZY52i//0fi4erL7fXx+Dxk+DDarsePokuwBynZ8WmFrQgw 7pHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742689916; x=1743294716; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Mt957Yff0HUUT1Np9eA/QPDiW2kOqUJZcgZqm/t9cV4=; b=ON+787XMK92lkdQfpg/2spHbBBNpAsyZD5eGI8LW2cDrO7ActjrduRrrNHU+2ypOXL 80lWxU11cjXhPs0EWPIs4zl+R8GLqVJBInJUGFvm/gPyT2O9Z/z6dkVjaeSWGqbXBM89 4z61CosDDmhMOKxMPNik/weLAsXM/RvGM1LBjtqJdwQ6dQ4tkGFWsq16zwECdPX2EduU fEIMxh2siAUspVtf2vSzOZNqB4u61VEXsju4cPSKZymKs5OQpJHF0PkaWs1hgsjP/Oxg SnASUMpb3yZGiMhsts/uWb2byqjB+cknwFIKdTl+vyw6naAhKVXZoUGGLYmzI/H1QTML B9gg== X-Gm-Message-State: AOJu0Yziq5nmHW9kTqMj65BFqmJfAhja29Sxuw3XikpnfBqupVk4uDTR 3ggpkgHnbqKPbsB1G/kW/bpseiSD7rNM+xqeKGm5GsyLNx/dCl4ChcLlkNVFrpHewOEhj097GgI ZRF4RgEX+4qj5yJKv+j9R4fIN3m1cng== X-Gm-Gg: ASbGncsCunCQpkQTz33VXVwXwM5ucAfS4kjUSaH0JNKCHcUcysZ3Cf4ELpC1LzEYYYH McNI5dvz/dmtTROfiVd81p81jb/O40go7+F+4cUae6w93dqeR4ZhL/MvgTYXazV6UKSjDQHX8Sp 3j8+jYTEN0QWgaNbW3uDxdCr9aZrsChUD4Fe0Cdapg7Y2uSmm7CZJavI/oQ4m8LarFHupFw5A= X-Google-Smtp-Source: AGHT+IExnoKeom9qHsI2167YNXPd1iIZ2nQM7i+bh+XdDd0Wx7E+V+yhXm/RfXZkBLE5+rcFdo05XFiczBTGZ5C1OwA= X-Received: by 2002:a05:690c:4c06:b0:700:a6be:d6b8 with SMTP id 00721157ae682-700bad114ecmr117272267b3.35.1742689916119; Sat, 22 Mar 2025 17:31:56 -0700 (PDT) MIME-Version: 1.0 From: Igor Korot Date: Sat, 22 Mar 2025 19:31:45 -0500 X-Gm-Features: AQ5f1Jo6mBOepw5T3ixLbj9wXI8PeVS1_28SEH9nmPnhy8IknTj9SHYwXbamt3M Message-ID: Subject: Determine server version from psql script To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000006772d70630f79da2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006772d70630f79da2 Content-Type: text/plain; charset="UTF-8" Hi, All, I have a big script that populated the DB for me. 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? Thank you. --0000000000006772d70630f79da2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, All,
I have a big script that popula= ted the DB for me.

I mad= e it based on the latest available version.

However,=C2=A0 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?
Thank you.

--0000000000006772d70630f79da2--