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 1vbzv9-000Yte-38 for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Jan 2026 11:35:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vbzv7-00CXWR-16 for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Jan 2026 11:35:46 +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 1vbzv6-00CXWI-30 for pgsql-hackers@lists.postgresql.org; Sat, 03 Jan 2026 11:35:45 +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 1vbzv4-003xuQ-3A for pgsql-hackers@lists.postgresql.org; Sat, 03 Jan 2026 11:35:44 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id BCFE94BD8C3 for ; Sat, 03 Jan 2026 12:35:39 +0100 (CET) Received: from s899.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id A802D4BDC6C; Sat, 03 Jan 2026 12:35:39 +0100 (CET) Received: from s473.loopia.se (unknown [172.22.191.5]) by s899.loopia.se (Postfix) with ESMTP id A5D9F2C8BA46; Sat, 03 Jan 2026 12:35:39 +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 s980.loopia.se ([172.22.191.6]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with UTF8LMTP id EY8NUOrCeiVG; Sat, 3 Jan 2026 12:35:39 +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 s980.loopia.se (Postfix) with ESMTPSA id 2D9E22201687; Sat, 03 Jan 2026 12:35:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxel.se; s=loopiadkim1707418970; t=1767440139; bh=D9uqJNcn2aiNd11kDzSh9AC7xYEy7TQN0U03TYwrSY0=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=YhYX7zXgCqod5B/Hb30nGLd1KLslwq6hDVppgqU+0irr1xQYhihvF9xf/prCP4ymk +wG3hexsFlaB8IS6GnIbobsP75iOlVbbVyor1vGFjEGaMbIZLQbujJGQMgKuUR151F rRbmDL06akNqgdnlxsOVdXMnhZbkdddrNAb5DrRyrerr+s6+b7WFf9BTdxoQ9oB6Sa blc2nBjM0XjOp8G+gmKuH6paDjZ6fjeNE6yBa/ACagNsYrbhvNkL3zhJzh0Cxi44YB 44Ac+V9DcFOdNOupfXijAuZWXTIpsPmAfU8vNw3lB2msOB4OLQTUVTyC5YHebfiIx2 NF8qzi2KRScYg== Message-ID: <9737c5d9-a388-4c1c-a5b5-9938b61a5bb8@proxel.se> Date: Sat, 3 Jan 2026 12:35:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: not fully correct error message To: Pavel Stehule , jian he Cc: PostgreSQL Hackers References: From: Andreas Karlsson Content-Language: en-US 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 1/3/26 7:34 AM, Pavel Stehule wrote: > here is a patch (with small regress test) Looks like a good change to me since the obvious question many people would ask themselves after seeing this error is if running it in a procedure would work instead and it does not. And this error message changes saves those people time which is a great thing. Tried out this patch and it worked and, as expected, also improved the error for other commands like CREATE DATABASE and REINDEX CONCURRENTLY so when this is commit the commit message should make it clear this is not just about VACUUM. A small suggestion is to change the message from: "%s cannot be executed from a function or a procedure" to: "%s cannot be executed from a function or procedure" I am not a native speaker but I think the second flows better. Andreas