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 1t2uvS-008WGk-Fa for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Oct 2024 16:06:34 +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 1t2uvP-008yaP-RH for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Oct 2024 16:06:32 +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 1t2uvP-008yaG-I4 for pgsql-bugs@lists.postgresql.org; Mon, 21 Oct 2024 16:06:31 +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 1t2uvM-002232-KU for pgsql-bugs@lists.postgresql.org; Mon, 21 Oct 2024 16:06:30 +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 49LG6RJG1568449; Mon, 21 Oct 2024 12:06:27 -0400 From: Tom Lane To: nat@makarevitch.org cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18665: Breaking a foreign constraint: the error message may be more detailed In-reply-to: <18665-95be0e49a07d758c@postgresql.org> References: <18665-95be0e49a07d758c@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 21 Oct 2024 01:51:22 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1568447.1729526787.1@sss.pgh.pa.us> Date: Mon, 21 Oct 2024 12:06:27 -0400 Message-ID: <1568448.1729526787@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: > A query breaking a foreign key triggers a "cannot truncate a table > referenced in a foreign key constraint" error. In the DETAIL section of > this message the child table name isn't fully qualified: it omits its schema > name. By and large, we don't include objects' schema names in error messages ever. I'm not sure why this specific one should break that habit. If you want to (re)start a conversation about whether more error messages should include schema names, you can ... but a bug report is not the mechanism for doing that. This is not a bug, it's acting as designed and in keeping with a lot of other code. regards, tom lane