Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGjnF-0000Ca-3Q for pgsql-sql@arkaria.postgresql.org; Fri, 11 Sep 2020 14:12:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kGjnE-0001aJ-29 for pgsql-sql@arkaria.postgresql.org; Fri, 11 Sep 2020 14:12:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGjnD-0001Zv-SM for pgsql-sql@lists.postgresql.org; Fri, 11 Sep 2020 14:12:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGjnB-0003lT-Qa for pgsql-sql@lists.postgresql.org; Fri, 11 Sep 2020 14:12:46 +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 08BECi8X370679; Fri, 11 Sep 2020 10:12:44 -0400 From: Tom Lane To: Mike Martin cc: pgsql-sql Subject: Re: Clarification on pg_attribute attrelid In-reply-to: References: Comments: In-reply-to Mike Martin message dated "Fri, 11 Sep 2020 12:26:44 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <370677.1599833564.1@sss.pgh.pa.us> Date: Fri, 11 Sep 2020 10:12:44 -0400 Message-ID: <370678.1599833564@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mike Martin writes: > Is it correct that calling attrelid::regclass will always return a > non-schema qualified relation name No. regclassout will schema-qualify if the table isn't visible according to the current search path. I didn't check, but I think "not visible" would include the case of "table is hidden by a temp table of the same name". regards, tom lane