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 1rPDA7-00A18m-I8 for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jan 2024 02:57:20 +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 1rPDA1-00DC0i-EL for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jan 2024 02:57:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPDA1-00DC0F-6R for pgsql-bugs@lists.postgresql.org; Mon, 15 Jan 2024 02:57:13 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPD9w-001a6C-A8 for pgsql-bugs@lists.postgresql.org; Mon, 15 Jan 2024 02:57:09 +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 40F2v35A1367518; Sun, 14 Jan 2024 21:57:03 -0500 From: Tom Lane To: zuming.jiang@inf.ethz.ch cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18292: Unexpected error: "relation "hobbies_r" does not exist" caused by user-defined functions In-reply-to: <18292-55856fb8254c79d6@postgresql.org> References: <18292-55856fb8254c79d6@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sun, 14 Jan 2024 18:48:13 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1367516.1705287423.1@sss.pgh.pa.us> Date: Sun, 14 Jan 2024 21:57:03 -0500 Message-ID: <1367517.1705287423@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > My fuzzer finds a suspicious alarm in Postgres 17devel: "ERROR: relation > "hobbies_r" does not exist". I report it as I think it might be an > unexpected error. I don't see anything unexpected here: you made a transaction-local change in search_path that renders that table invisible. It's not instantly obvious how the flow of control gets to a lookup of that table after the SET LOCAL; but evidently that's happening, and I don't feel any urge to work out the details. (Note that if you were expecting SET LOCAL to mean "local to this function call", you're mistaken. You can get that effect with a SET clause attached to the function definition; but this is not that.) If you want people to take this sort of report seriously, you need to analyze the behavior yourself, not expect us to look for a bug that probably doesn't exist. regards, tom lane