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 1twPMl-00E9dG-R0 for pgsql-general@arkaria.postgresql.org; Sun, 23 Mar 2025 17:44:07 +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 1twPMk-002gqd-Bj for pgsql-general@arkaria.postgresql.org; Sun, 23 Mar 2025 17:44:06 +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 1twPMk-002gqU-0t for pgsql-general@lists.postgresql.org; Sun, 23 Mar 2025 17:44:06 +0000 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1twPMh-000i5o-2s for pgsql-general@lists.postgresql.org; Sun, 23 Mar 2025 17:44:05 +0000 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-2bcca6aae0bso3400047fac.1 for ; Sun, 23 Mar 2025 10:44:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742751842; x=1743356642; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8G7Xb+HnCeQkdKMa2Vb/LLdJZNWLbeG6niIMmc3wUZ4=; b=WmPA/GEdbOoORiJnLIGFce1+PT/3p+OD6HllVOjBR8xxnM8sBt1bSQHekpcI6Jn70G NoTEWA9yIGq8JQEfC+Aurbv7UwDvF6Z6t8q1MOwnODueRlhyAtx2zet6zcRO+347NTW4 49yV+s4L84ZrtyPlg09JyCBFO7EVM2pEpHNbvm8tun5sgKwfI1IxwrJjfyHyqaimWr4N biPGJT1Nn5HRfahC/QrOVliQRoQMqmabB3F+TFxh4S6tGSdAhIfdRR6QlOXV0gT9V5u2 2H1FOqZm94YImYc3T/bjW/Bjbrm43fxPR3muBOG09X+/MkCuQEeJ3WZ2Ue/Fv3CowryQ QNjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742751842; x=1743356642; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8G7Xb+HnCeQkdKMa2Vb/LLdJZNWLbeG6niIMmc3wUZ4=; b=peefNANvioaiZvU9d1wyhC0TgLyc3Yni3ap1Sis0qujLekVPSah9H3E+LZBb2mx91n /Z6aMFRnw2XVmtN3pYViPRxt1RK3R6tujVz8UYwKFfIZMDfPIq4BoKt7vy0hvWd+gsHY LlhKMVrOEbanwGMAQxOVJqwMPyMkJP3e5Z7ZL6Rsv4nvMmX3U0a4KMbmrQjaMb5jEj21 h6NY9YU0No+noFwR1s1I6QoJNXvrqKbv3YHf2rV92KUdj2AgP+FDtw++DSdl/z106rrk IYZuBKBeuU4d3Ec8FRj8lzQe22+cX0VyUQegBqOHiUL5K5jmkEONJ/JP37gJ0FvI0gmN 3Mfg== X-Forwarded-Encrypted: i=1; AJvYcCUN1nefDkRad0nEHf/08mtLwlErcSKFezHdLkP/meVtXwQ02SIXn8gX4UrTcRW/xSoEqGuuoF1yJwH3w+G/@lists.postgresql.org X-Gm-Message-State: AOJu0YzFiq1mh+Phy7yKX1JoOkBcsNDHZ4SosGwHvaCvCP/HeBWuyMsk lXM5M7QfAaGXzL0PqUT/xufuO9seATEBzG2UxsiULfNo2xwIpsSHuD5i2UaH09dtDjwoMcv1RjW bW2MIYNjLwAc8tX6pP0aLZQA/+gE= X-Gm-Gg: ASbGncuTxD+jdkfaWJ7TdFlsI7ANSPbbOzYDvf5GzWj1HMdW/yYA0/LKsbfg7Kkrykp zgKoVSWZRn+1IHG5T5RFxD3Klu2hdecUQtASdxr71FqwCkP6Ul5hHrvj2UbYloqy318Wbf5KCcy p/iU+GAaJuH53jzTRd6sTihC+7 X-Google-Smtp-Source: AGHT+IFvPUIevCePwY2+2QyIWGRKjiWlrmTNRcutdwzrx10CddNzOzkQfOo1kVlJIbaoJ1HjNGoIEsin8yyTMVS6LUw= X-Received: by 2002:a05:6870:8194:b0:2c2:cd87:7521 with SMTP id 586e51a60fabf-2c780246312mr6788016fac.4.1742751841793; Sun, 23 Mar 2025 10:44:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a8a:349:0:b0:589:13f9:e937 with HTTP; Sun, 23 Mar 2025 10:44:01 -0700 (PDT) In-Reply-To: References: <90741d5f-5cda-4c4a-84f4-c470129732f4@aklaver.com> <473602.1742698901@sss.pgh.pa.us> From: "David G. Johnston" Date: Sun, 23 Mar 2025 10:44:01 -0700 X-Gm-Features: AQ5f1Jp8l8zzFj5OznjpRJ-9IbInxZitgQrWpDcRNtNjcRkxVAZpuUFhAoFTzwE Message-ID: Subject: Re: Determine server version from psql script To: Igor Korot Cc: Tom Lane , Adrian Klaver , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000763e8506310608c9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000763e8506310608c9 Content-Type: text/plain; charset="UTF-8" On Sunday, March 23, 2025, Igor Korot wrote: > > 2. Is there a way to do CREATE TRIGGER IF NOT EXIST for the earlier > version? > No. You have to drop the trigger if it does exist and then create the new one. David J. --000000000000763e8506310608c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sunday, March 23, 2025, Igor Korot <ikorot01@gmail.com> wrote:

2. Is there a way to do CR= EATE TRIGGER IF NOT EXIST for the earlier version?
=

No.=C2=A0 You have to drop the trigger if it does exist= and then create the new one.

David J.
= =C2=A0
--000000000000763e8506310608c9--