From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alastair McKinley <a.mckinley@analyticsengines.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Function definition regression in 15beta1 when specific parameter name (string) is used
Date: Sun, 29 May 2022 13:43:17 -0400
Message-ID: <3498459.1653846197@sss.pgh.pa.us> (raw)
In-Reply-To: <PAXPR02MB760049C92DFC2D8B5E8B8F5AE3DA9@PAXPR02MB7600.eurprd02.prod.outlook.com>
References: <PAXPR02MB760049C92DFC2D8B5E8B8F5AE3DA9@PAXPR02MB7600.eurprd02.prod.outlook.com>
Alastair McKinley <a.mckinley@analyticsengines.com> writes:
> 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;
Commit 1a36bc9db seems to have defined STRING as a type_func_name_keyword,
which strikes me as a pretty horrible trampling on user namespace. That
means you can't have tables or columns named "string" anymore either, and
I'll bet money the latter restriction is going to bite a lot of people.
In a quick experiment here, I don't see any bison complaints if I
back it down to unreserved_keyword, so this seems easily fixable.
I wonder though if we don't need more review of patches that add
partially- or fully-reserved keywords.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, a.mckinley@analyticsengines.com, andrew@dunslane.net
Subject: Re: Function definition regression in 15beta1 when specific parameter name (string) is used
In-Reply-To: <3498459.1653846197@sss.pgh.pa.us>
References: <PAXPR02MB760049C92DFC2D8B5E8B8F5AE3DA9@PAXPR02MB7600.eurprd02.prod.outlook.com> <3498459.1653846197@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox