Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iRNDg-0002Bs-G9 for pgsql-general@arkaria.postgresql.org; Sun, 03 Nov 2019 21:15:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iRNDf-0004ht-9V for pgsql-general@arkaria.postgresql.org; Sun, 03 Nov 2019 21:15:31 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iRNDe-0004gx-WF for pgsql-general@lists.postgresql.org; Sun, 03 Nov 2019 21:15:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iRNDc-0003zm-R8 for pgsql-general@lists.postgresql.org; Sun, 03 Nov 2019 21:15:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xA3LFNl9031368; Sun, 3 Nov 2019 16:15:23 -0500 From: Tom Lane To: Michael Shapiro cc: pgsql-general@lists.postgresql.org Subject: Re: select view definition from pg_views feature request In-reply-to: References: Comments: In-reply-to Michael Shapiro message dated "Sun, 03 Nov 2019 14:33:55 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31366.1572815723.1@sss.pgh.pa.us> Date: Sun, 03 Nov 2019 16:15:23 -0500 Message-ID: <31367.1572815723@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Shapiro writes: > It seems that the definition of a view from pg_catalog.pg_views does not > qualify the tables used in the view if the tables are in the current search > path. > Is it possible to either have the definition always qualify all tables > independent of the search_path (or else provide a new column that does > that)? Why don't you just change the search path to empty before selecting? regards, tom lane