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

From David Rowley
Subject Re: select view definition from pg_views feature request
Date
Msg-id CAKJS1f9S0JOoE0CVzrrrumYzBvTSGKx3rct+rvjscdurwJ_frA@mail.gmail.com
Whole thread Raw
In response to Re: select view definition from pg_views feature request  (George Neuner <gneuner2@comcast.net>)
List pgsql-general
On Tue, 5 Nov 2019 at 11:05, George Neuner <gneuner2@comcast.net> wrote:
>
> On Sun, 03 Nov 2019 16:15:23 -0500, Tom Lane <tgl@sss.pgh.pa.us>
> >Why don't you just change the search path to empty before selecting?
>
>
> 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?

See https://www.postgresql.org/docs/current/sql-set.html

"SET only affects the value used by the current session."

Also:

"The effects of SET LOCAL last only till the end of the current transaction"

Neither affects other sessions.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



pgsql-general by date:

Previous
From: George Neuner
Date:
Subject: Re: select view definition from pg_views feature request
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Create a logical and physical replication