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 1wLKDa-001hqp-08 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 12:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wLKDY-009Ng9-1p for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 12:22:08 +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 1wLKDY-009Ng0-0h for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2026 12:22:08 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wLKDV-00000000oBC-0mdP for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2026 12:22:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1778242926; x=1809778926; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=rx8xnAeK8f+Atbd0aq060KaM6WRSRh52TjGqeTwhAgw=; b=XOabg7pMkqUvlQPp9wwh2y8Fzyn6D4FJxjWetsE0B18DrHGoRkTg8OAt cq0uA1r27FzDSlSnGNOu68G2kpuhOu04FNepUA3OelFskPkn1DbZEruXp Rxd3yHM5NTlZYXR/DbPRcc/MyoPuGQ/Zx4xi3j1xI1lCr70bFXvlQtc6e DKET+5ru04uRbutP1NCyX+8YPyDDIJv6/l620lJ0p67QNn+x19c9e+mps aV78LX/lg/VwXzPY2hZMIft+AloQ9bPLjLRQwrM0Wkneqa7/h0Dhyy7z1 shN+p2H4yJLbdkxWwpqBZMBwbCJqz/wsMv7qiy5WmFQT4svZAKk3x2qCA Q==; X-CSE-ConnectionGUID: 3w7AZKMkQXC1GR3aKk9Cqg== X-CSE-MsgGUID: Ey8YCEQkQvmkkCUgOrqH/A== X-IronPort-AV: E=Sophos;i="6.23,223,1770591600"; d="scan'208";a="393545248" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 08 May 2026 14:22:03 +0200 Received: from [192.168.178.49] (dynamic-093-131-101-118.93.131.pool.telefonica.de [93.131.101.118]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id E595820ADF02; Fri, 8 May 2026 14:22:01 +0200 (CEST) Message-ID: Date: Fri, 8 May 2026 14:22:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fix wrong error message from pg_get_tablespace_ddl() To: Andrew Dunstan , Chao Li , PostgreSQL Hackers References: <53D05145-CE87-424F-A492-BB22A09BBE11@gmail.com> <9cc5e7a5-1cbc-4e07-ace4-ad04a8e1a6fe@uni-muenster.de> <91b25e9b-5761-4046-84ef-cb73b5db17e6@dunslane.net> Content-Language: en-US, de-DE From: Jim Jones In-Reply-To: <91b25e9b-5761-4046-84ef-cb73b5db17e6@dunslane.net> 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 08/05/2026 14:07, Andrew Dunstan wrote: > I'm not 100% convinced these are in fact wrong. The user asks for the > DDL for a named role or tablespace and we tell them that they don't have > the privilege to get the information for that object. If we tell them > that the problem is that they don't have privilege on the underlying > catalog table, they might think "Well, I didn't ask for that". I honestly don't have a strong opinion either way. It depends on what we expect from the error message. If its purpose is simply to tell the user "you can't access this object," the current message is totally fine. If, however, the goal is to show the error's root cause, it could be a bit misleading. Best, Jim