Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nvMjB-0001jN-Qg for pgsql-general@arkaria.postgresql.org; Sun, 29 May 2022 17:29:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nvMjA-0005Ij-GY for pgsql-general@arkaria.postgresql.org; Sun, 29 May 2022 17:29:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nvMj8-0005H1-Oo for pgsql-general@lists.postgresql.org; Sun, 29 May 2022 17:29:20 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nvMj5-0003zS-Qc for pgsql-general@lists.postgresql.org; Sun, 29 May 2022 17:29:17 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 852565C010F; Sun, 29 May 2022 13:29:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 29 May 2022 13:29:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1653845354; x= 1653931754; bh=SGrn91msdy0Kc0VRr3CDtR1qxI9sUeXMpbQMao+G4p4=; b=Q rKzVlhjk/yMaHRCBWwaptECcNPFTt5gp36+Ao42ycF9nLKzVAfji5Y5QdfA8TuQe FwPmvz7QQCX2W5+si15WzO8DxpxWZ4XeMhHIoB4AOWvJ0HTPKol/Ruh2tvpEdCsn 9txkm3oafhH2/X9gRAAjGaWBs/3jgRXiWFVM9hBLNuo30DYvq0dKhuPVee+blpmf AIgnjlpiL2RUvwxlrJIv89sijCPRBbPVaoAr6k6R6+YgxhkAuLjslKdl6WQiPfGE p0v/sSMQNTvVY3FswAAkuAFs1GTYMVeDa2OHOepZ+5dIFkSUSAIRye0ETIyvpYBb jUj/d/ufcU0qNWCMh3ksA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1653845354; x=1653931754; bh=S Grn91msdy0Kc0VRr3CDtR1qxI9sUeXMpbQMao+G4p4=; b=d5jdHn99rW6mmYt8t AtVpYjwtvMHcE9mKyIGOTQz1w+neXS3FOof7/XZl8e0kFP16997ynPQ+YWmrB/Tr q4ZFJeyi5EYsJqGu1hxoV5B8U7tooQ36m3oNv1gAt4ET+2q61xSguTHbVk9o3L4d JTOGfwfzgEVGcK+GvV68XvspLGnoDenHxeHvzM3krOX79mbNFzsfPVDOonZIWlmP 3Pbq/MTZLmUoEg8IQdisIpdQ85pikbsBDmKLyemRyUYG6upR6+a91T0WMQy2udmJ GaIkzRY2/MHxTBcl34EQUvAAWBfft+l6/jnFJvh7iRNK5cvdSvQmBOzGqYj+Hg9C WYHsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrkeeggdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeffudehtddugefgkeevudffheevvefhfeettdfhveei vdfgieeghfeiueeggffggeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 May 2022 13:29:13 -0400 (EDT) Message-ID: Date: Sun, 29 May 2022 10:29:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Function definition regression in 15beta1 when specific parameter name (string) is used Content-Language: en-US To: Alastair McKinley , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/29/22 09:46, Alastair McKinley wrote: > Hi all, > > I was testing an existing codebase with 15beta1 and ran into this issue. > > I reduced the test case to an example with works in 14.3, and fails in 15beta1. > > The following function definition fails in 15beta1 (ok in 14.3): > > create or replace function regexp_match_test(string text,pattern text) returns text[] as > $$ > select regexp_match(string,pattern); > $$ language sql; > > The error message is: > > ERROR: syntax error at or near "," > LINE 3: select regexp_match(string,pattern); > ^ > Changing the first parameter name from string to anything else (e.g. strin or string1) resolves the issue. > > The issue also occurs with the "string" parameter name if this is used in a plpgsql function like this: > > create or replace function regexp_match_test(string text,pattern text) returns text[] as > $$ > begin > return (select regexp_match(string,pattern)); > end; > $$ language plpgsql; > > Best regards, Postgres 15: https://www.postgresql.org/docs/15/sql-keywords-appendix.html STRING reserved (can be function or type) non-reserved Postgres 14: https://www.postgresql.org/docs/14/sql-keywords-appendix.html STRING non-reserved I don't have a 15 instance available, but I would double quoting "string" would work. > > Alastair > -- Adrian Klaver adrian.klaver@aklaver.com