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 1twWiV-00FI60-H7 for pgsql-general@arkaria.postgresql.org; Mon, 24 Mar 2025 01:35:03 +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 1twWiS-009RVc-RT for pgsql-general@arkaria.postgresql.org; Mon, 24 Mar 2025 01:35:00 +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 1twWiS-009RVU-GC for pgsql-general@lists.postgresql.org; Mon, 24 Mar 2025 01:35:00 +0000 Received: from smtp92.ord1d.emailsrvr.com ([184.106.54.92]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1twWiP-000lxO-2f for pgsql-general@lists.postgresql.org; Mon, 24 Mar 2025 01:35:00 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp4.relay.ord1d.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 4C606401DE; Sun, 23 Mar 2025 21:34:55 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: Determine server version from psql script From: Christophe Pettus In-Reply-To: Date: Sun, 23 Mar 2025 18:34:24 -0700 Cc: "David G. Johnston" , Pavel Stehule , Tom Lane , Adrian Klaver , "pgsql-generallists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <90741d5f-5cda-4c4a-84f4-c470129732f4@aklaver.com> <473602.1742698901@sss.pgh.pa.us> To: Igor Korot X-Mailer: Apple Mail (2.3776.700.51.11.1) X-Classification-ID: f162172e-e49e-49f2-8bfb-f5742ca18f04-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mar 23, 2025, at 18:08, Igor Korot wrote: > CREATE TRIGGER playersinleague_insert AFTER INSERT ON = playersinleague WHEN new.current_rank IS NULL The WHEN predicate has to be enclosed in parenthes: CREATE TRIGGER playersinleague_insert AFTER INSERT ON = playersinleague WHEN ( new.current_rank IS NULL )=