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 1u0ot6-008Vqf-HX for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 21:47:44 +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 1u0ot4-005KFS-HK for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 21:47:42 +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 1u0ot4-005KFK-7Y for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 21:47:42 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u0ot2-003Qud-0P for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 21:47:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 534LlYU52048516; Fri, 4 Apr 2025 17:47:34 -0400 From: Tom Lane To: Alexander Lakhin cc: Alexander Pyhalov , Pavel Stehule , Alexander Korotkov , pgsql-hackers@lists.postgresql.org, Ronan Dunklau Subject: Re: SQLFunctionCache and generic plans In-reply-to: <6d442183-102c-498a-81d1-eeeb086cdc5a@gmail.com> References: <8216639.NyiUUSuA9g@aivenlaptop> <445556.1738612687@sss.pgh.pa.us> <464677.1738620525@sss.pgh.pa.us> <1fc18af56d5fb27bf3e153ffaa2ed70d@postgrespro.ru> <2615770.1740688857@sss.pgh.pa.us> <448c63cf9b4f917c01802309b9c29eb9@postgrespro.ru> <2827970.1741890560@sss.pgh.pa.us> <337e011069b6831e063bfa346f49bb46@postgrespro.ru> <3344719.1741985546@sss.pgh.pa.us> <2691107.1743257329@sss.pgh.pa.us> <3605427.1743351017@sss.pgh.pa.us> <248291.1743463745@sss.pgh.pa.us> <1101294.1743617356@sss.pgh.! pa.us> <0fde377a-3870-4d18-946a-ce008ee5bb88@gmail.com> <1454289.1743707630@sss.pgh.pa.us> <6d442183-! 102c-498a-81d1-eeeb086cdc5a@gmail.com> Comments: In-reply-to Alexander Lakhin message dated "Fri, 04 Apr 2025 22:00:01 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2048514.1743803254.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Apr 2025 17:47:34 -0400 Message-ID: <2048515.1743803254@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Lakhin writes: > I've stumbled upon another defect introduced with 0dca5d68d: > CREATE FUNCTION f(VARIADIC ANYARRAY) RETURNS ANYELEMENT AS $$ SELECT x F= ROM generate_series(1,1) g(i) $$ LANGUAGE SQL = > IMMUTABLE; > SELECT f(1); > SELECT f(1); Hmm, I see regression=3D# CREATE FUNCTION f(VARIADIC ANYARRAY) RETURNS ANYELEMENT AS = $$ SELECT x FROM generate_series(1,1) g(i) $$ LANGUAGE SQL IMMUTABLE; CREATE FUNCTION regression=3D# SELECT f(1); ERROR: column "x" does not exist LINE 1: SELECT x FROM generate_series(1,1) g(i) = ^ QUERY: SELECT x FROM generate_series(1,1) g(i) = CONTEXT: SQL function "f" statement 1 regression=3D# SELECT f(1); ERROR: unrecognized node type: 2139062143 CONTEXT: SQL function "f" statement 1 Did you intend the typo? The "unrecognized node type" does indicate a problem, but your message doesn't seem to indicate that you're expecting a syntax error. regards, tom lane