Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftgMF-0008GJ-02 for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Aug 2018 21:44:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ftgMC-00086B-27 for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Aug 2018 21:44:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftgMB-000864-SU for pgsql-bugs@lists.postgresql.org; Sat, 25 Aug 2018 21:44:31 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftgM9-0007nT-JJ for pgsql-bugs@lists.postgresql.org; Sat, 25 Aug 2018 21:44:31 +0000 Received: from [192.168.127.1] (port=22427 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1ftgM6-0004Vk-Bw; Sat, 25 Aug 2018 21:44:26 +0000 Received: from [127.0.0.1] (port=48292 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1ftgM5-000Eqq-HL; Sat, 25 Aug 2018 21:44:25 +0000 From: Andrew Gierth To: pgsql-bugs@lists.postgresql.org, maxim.boguk@gmail.com Subject: Re: BUG #15353: \det (list foreign tables) ignoring search_path In-Reply-To: <153523137867.1487.3492770600528164072@wrigleys.postgresql.org> (PG Bug reporting form's message of "Sat, 25 Aug 2018 21:09:38 +0000") Message-ID: <875zzyyvjh.fsf@news-spur.riddles.org.uk> References: <153523137867.1487.3492770600528164072@wrigleys.postgresql.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Sat, 25 Aug 2018 22:44:24 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "PG" == PG Bug reporting form writes: PG> Looks like that the \det[+] [PATTERN] list foreign tables PG> ignoring current searh_path settings: Nope, what you're missing is that pg_catalog is implicitly on the front of the search path (if not otherwise specified), so pg_catalog.pg_stat_user_tables is considered to "hide" public.pg_stat_user_tables. Object X in schema Y is only considered "visible" if using the unqualified name "X" actually resolves to the Y.X object, and in this case, if one just refers to "pg_stat_user_tables" one gets pg_catalog.pg_stat_user_tables, not public.pg_stat_user_tables. -- Andrew (irc:RhodiumToad)