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 1tw9QS-00BDCT-0i for pgsql-general@arkaria.postgresql.org; Sun, 23 Mar 2025 00:42:52 +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 1tw9QQ-005my2-Ko for pgsql-general@arkaria.postgresql.org; Sun, 23 Mar 2025 00:42:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tw9QP-005mvh-OR for pgsql-general@lists.postgresql.org; Sun, 23 Mar 2025 00:42:50 +0000 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tw9QM-000acJ-0o for pgsql-general@lists.postgresql.org; Sun, 23 Mar 2025 00:42:49 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.stl.internal (Postfix) with ESMTP id AA22811400E4; Sat, 22 Mar 2025 20:42:44 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Sat, 22 Mar 2025 20:42:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1742690564; x=1742776964; bh=BvVy1x4rn9KwZlcLn+yxeL+aXbb1f+VywLxrfRBf8LM=; b= nAxGDtDX2QqnDyoBhG1gs1mlfzLVnQYlJCrg55XAGXIfF4N7JAsemnJVLpZc61lp 8yB2nV7n8PHb4MA3Kre/B4OSZe2NRwu71i74FuCrX6JY5U+ehuRIg6fT5vqKBjvu 3iuutRsx8JAfpA4pt8sDdGcd5DNK5cbBtpPtmBETB38qVNIo09aWw8OFpwdVuCiR fECa3JK3ucy0i9mNDRVttX2lVY+866NHz/aO4VtCg+cjPcgBhJgSaNf5Ja0kNTRY J4VjKGUo4djqCuAELVi/jGT3pQMvynLlg/JzgfjY5Ps3I39Ys66az6nnLM5GeeRS tsTXDakx4rUvBDFCN6MUxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1742690564; x=1742776964; bh=B vVy1x4rn9KwZlcLn+yxeL+aXbb1f+VywLxrfRBf8LM=; b=uMZo8mOWFDmlm6Iby Y/PKzbxdc5Mjv2i6P3HLOafdIOBZ8yqwJ92PpdMmTXSIf8MRgzufADcExThnkkBo vjKDJoiZT16BMaQCmkZuOYWp49GrwiItEnjU4dHVfHEziS8+89qfJszxuoerINE8 v05j4T0XV/QtGmJ7DihY5jii+5qkunTHkK5bCXmG6CohutNEJN4mSPKBIwQBvRoY zbv+yu7kgNoARvxyEZbfK9RhHUkiAUGQzXP1H2X6Rumh5KJM9W68af8VlQNgt/AI 5pgaoUWk57w8YqfKG6d4lOT6jdc3ZBNalLD5PRSD6wZO2bYXR0GIWiVG6XIXoZiB baYng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduheehgeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeelgeevkeekkeeuiefg tdevieeluefhfedufeetkeejffekjeeujeehgeehgeektdenucffohhmrghinhepphhosh htghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnh gspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhkohhr ohhttddusehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlh eslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 22 Mar 2025 20:42:43 -0400 (EDT) Message-ID: <90741d5f-5cda-4c4a-84f4-c470129732f4@aklaver.com> Date: Sat, 22 Mar 2025 17:42:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Determine server version from psql script To: Igor Korot , "pgsql-generallists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 adrian.klaver@aklaver.com