Re: select view definition from pg_views feature request

From: George Neuner <gneuner2(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: select view definition from pg_views feature request
Date: 2019-11-04 22:05:11
Message-ID: 8r71se1hojl24v6ogd8jdicldc3g40a3t6@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 03 Nov 2019 16:15:23 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

>Michael Shapiro <mshapiro51(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2019-11-05 01:29:00 Re: select view definition from pg_views feature request
Previous Message Alvaro Herrera 2019-11-04 19:44:19 Re: v12 and pg_restore -f-