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.96) (envelope-from ) id 1vc6cP-0028FD-2E for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Jan 2026 18:44:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vc6cO-00DRKv-22 for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Jan 2026 18:44:53 +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.96) (envelope-from ) id 1vc6cO-00DRKm-0i for pgsql-hackers@lists.postgresql.org; Sat, 03 Jan 2026 18:44:53 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vc6cM-0040pr-0m for pgsql-hackers@lists.postgresql.org; Sat, 03 Jan 2026 18:44:51 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id DEB934FCFAE for ; Sat, 03 Jan 2026 19:44:45 +0100 (CET) Received: from s979.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id C4FC84FD2F1; Sat, 03 Jan 2026 19:44:45 +0100 (CET) Received: from s473.loopia.se (unknown [172.22.191.6]) by s979.loopia.se (Postfix) with ESMTP id BC79C10BC462; Sat, 03 Jan 2026 19:44:45 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s473.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=proxel.se Received: from s979.loopia.se ([172.22.191.6]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with LMTP id AiQwq0PA5P3q; Sat, 3 Jan 2026 19:44:45 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: andreas@proxel.se X-Loopia-Originating-IP: 147.28.75.140 Received: from [192.168.0.121] (customer-147-28-75-140.stosn.net [147.28.75.140]) (Authenticated sender: andreas@proxel.se) by s979.loopia.se (Postfix) with ESMTPSA id 3902010BC440; Sat, 03 Jan 2026 19:44:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxel.se; s=loopiadkim1707418970; t=1767465885; bh=TYlXmDir8MR3FXdIzSc4der7VpyxyVI+57N5lq5sYFw=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=NEKDZ5phZOTy1HtBXEbTfC87ODel7Ou1F2c3HZH32bzslEr3+NzSXTg6npqYIm/lq qw5Fbq9YdZrrMHKj1BHwjOzs/TxFasdhmoMO2iQZraNgisxfK+IYd49ncppe3bj3gl IdJZ6xvRy9LUDcHO9tCBrAGJ5okgfMOaNPAlBwJnXxxQ2Y7pgcRwybNCHgLt0QH9pm /wmCHEDlG9+jBbJdX0OQV+iEvF9Z7zBKE9X5j4c59+9SD78RTyVpxJLYURNEL467Qn 5xCrrB+r/trwnXM99alOcXvqNk5SyC/G8LDMncf5ef2mjaePyYB9zxffY7c3c7s6CE 3qcqpi46ezT8w== Message-ID: Date: Sat, 3 Jan 2026 19:44:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: not fully correct error message To: Tom Lane Cc: Marcos Pegoraro , Pavel Stehule , jian he , PostgreSQL Hackers References: <8fa16ea7-09a1-4ec2-b668-1e36d4c8ace4@proxel.se> <409108.1767463422@sss.pgh.pa.us> From: Andreas Karlsson Content-Language: en-US In-Reply-To: <409108.1767463422@sss.pgh.pa.us> 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 1/3/26 7:03 PM, Tom Lane wrote: > Andreas Karlsson writes: >> A potential third option would be to take your solution but to add a >> HINT about that it needs to run as a top-level statement outside any >> transactions, but I kinda liked how simple the original patch was. > > Yeah, I like just adding "or procedure" and calling it good. > I do not think we need a regression test, either ... Yeah, let's keep it simple. > Poking around, I also found this: > > src/backend/commands/wait.c: errdetail("WAIT FOR cannot be executed from a function or a procedure or within a transaction with an isolation level higher than READ COMMITTED.")); > > which is also not great grammar. What do you think of "WAIT FOR > cannot be executed from a function or procedure, nor within a > transaction with an isolation level higher than READ COMMITTED." ? Much better! Andreas