Re: select view definition from pg_views feature request - Mailing list pgsql-general

From George Neuner
Subject Re: select view definition from pg_views feature request
Date
Msg-id 8r71se1hojl24v6ogd8jdicldc3g40a3t6@4ax.com
Whole thread Raw
In response to select view definition from pg_views feature request  (Michael Shapiro <mshapiro51@gmail.com>)
Responses Re: select view definition from pg_views feature request  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-general
On Sun, 03 Nov 2019 16:15:23 -0500, Tom Lane <tgl@sss.pgh.pa.us>
wrote:

>Michael Shapiro <mshapiro51@gmail.com> 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


I'm guessing this is fine inside a transaction, but what if you're
using a client that commits by statement?  In that case, wouldn't the
change to the path affect the other backends?

George




pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: question about array indexing
Next
From: David Rowley
Date:
Subject: Re: select view definition from pg_views feature request