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 1twWQ6-00FFZv-19 for pgsql-general@arkaria.postgresql.org; Mon, 24 Mar 2025 01:16:02 +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 1twWQ4-009635-Cn for pgsql-general@arkaria.postgresql.org; Mon, 24 Mar 2025 01:16: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 1twWQ4-009613-0l for pgsql-general@lists.postgresql.org; Mon, 24 Mar 2025 01:16:00 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1twWQ1-000loz-2n for pgsql-general@lists.postgresql.org; Mon, 24 Mar 2025 01:15:59 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-2c7b2c14455so592707fac.2 for ; Sun, 23 Mar 2025 18:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742778956; x=1743383756; 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=FJioCm6+60D9EOrgBO7nfrCl7wCj7I9YaPwgpTukwWI=; b=nG6giDltFKVJps0OjHNpAW+klS/tlg1Sh/WbFeZxKP/GwkKPZbYR9OVdyEOtgYuYVn aRzkv5b7LZd1jguHn1K3Yuq2vBZ20ceC8+mtTSxRgghHBgOHFkSDXiJh2Z2IQypEhY6n qNaEIAB6GP1Zh7FfY7+chzg2pZ4FzlIzGEyVOLyj8qZ+CfoXoc+7OOaj3cJ75KpEnrXK Wj/YfjoFaHM9q2Oix1zVhjPE9gykFC4K8WFVdhOwYYo3taSH8AP+PX7YrnJLVcQbKE6s RmzJrl2JtoAS7btC21T38ww5wDnoqXvKwmvBY2amonvHSuQW9IXnXNIkkgvjZwk84EnC +k/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742778956; x=1743383756; 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=FJioCm6+60D9EOrgBO7nfrCl7wCj7I9YaPwgpTukwWI=; b=Hxvu0zFSl9mWi55chyZilHW98yxd059RlBMl6hyoCf0wk+aCf4+xbdm86pxFzbD2xN ba2cfRp53Yof9cqWzsl6fczfS/Ww0KlPcSx0tw1mDiSGyg6LgSDk/wpB050rJy7E5row 5FH7rPfkYm3Xy6hJZipnuhEhxW12dlUQlRtQHQ/buAyirfBxdspoj5kZC1xlzttU2ejp qc9z94GtI+p/HAQkp/jxsH2xo6p7bpEMDfDTWxzZqQiGBK8Lq5rjAkLpMBgfQqgCm25Z oxLkZOK25I2oTamIcEtsMo/PxWXcYKPrfdL4f627+RK3ycbz92kcXq+tDzohCBFgEgkx /e7A== X-Forwarded-Encrypted: i=1; AJvYcCWmzf3PPobK+IfemA9hKCc7EXYXhi6JLv+aYzsNXgphl3p4TT+Ruk6+yL9DPechZ8w+2tHhf94Y+LuqK+/S@lists.postgresql.org X-Gm-Message-State: AOJu0YzRAfk2QrlSl7g1yxLq3fyV9IMLSKgieiirhkmJFKCY/FpPP6yv 0/dO39pLVmwwtoNmtiybbol9rhQ0LVhLqSCxKej6lnPp9BRHzwizVJKYSYcVCXZKqK/E+3bEx8U r8YG53y3gt3nsffh4Ilf587qTYdI= X-Gm-Gg: ASbGncsZwrAzPbeGF0rDLo0Ho24LUIZy6Bf5n3bI+kJ7h9ui6vl1NwziByFVfTBj8UT EQ0Stkk6UYyOijQk6r3AjQjwC0BjwHOAB8v6lfMqp0pN8+8cVOmiVG07SAFlLNQixsxD9P54k2l piNKVVSVPA9Xq2TcXgotA/Km26 X-Google-Smtp-Source: AGHT+IGXaOQa+M7WIOLandQMpyicfAYouQnjcqKpqcND+JYmCHW5rMjSKPHLUqEmBziEmRSTMubmLUnN7EZmtPHTE40= X-Received: by 2002:a05:6870:2247:b0:2c1:6663:f603 with SMTP id 586e51a60fabf-2c78034ccffmr6969879fac.19.1742778955655; Sun, 23 Mar 2025 18:15:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a8a:349:0:b0:589:13f9:e937 with HTTP; Sun, 23 Mar 2025 18:15:54 -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 18:15:54 -0700 X-Gm-Features: AQ5f1JopToN9hOkSRs7wlQPq3Zpj3zKOO2ipRJnsAb8xVzfl5PSXCldmxcOoTVQ Message-ID: Subject: Re: Determine server version from psql script To: Igor Korot Cc: Pavel Stehule , Tom Lane , Adrian Klaver , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000092f20b06310c58f1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000092f20b06310c58f1 Content-Type: text/plain; charset="UTF-8" On Sunday, March 23, 2025, Igor Korot wrote: > > CREATE TRIGGER playersinleague_insert AFTER INSERT ON playersinleague > WHEN new.current_rank IS NULL > > When the syntax shows parentheses you are required to write them. [ WHEN ( *condition* ) ] David J. --00000000000092f20b06310c58f1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sunday, March 23, 2025, Igor Korot <ikorot01@gmail.com> wrote:

=C2=A0 =C2=A0 CREATE TRIGGER playersinleague_insert AFTER INSERT ON players= inleague WHEN new.current_rank IS NULL
=C2=A0 =C2=A0=C2=A0

When the syntax shows parentheses you are requ= ired to write them.

=C2=A0 [ WHEN ( <= code style=3D"box-sizing:border-box;font-family:monospace,monospace;font-si= ze:inherit;border-radius:0.25rem;margin:0.6rem 0px;word-break:normal">condi= tion ) ]

David J.

--00000000000092f20b06310c58f1--