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

From Michael Shapiro
Subject Re: select view definition from pg_views feature request
Date
Msg-id CAGCvxeb63kt0yCOdGB2dkuEzvdKk33LQkAk-GawynMuc2SUnZw@mail.gmail.com
Whole thread Raw
In response to Re: select view definition from pg_views feature request  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Is that how PgAdmin does it? The views extracted by PgAdmin are fully qualified....


On Sun, Nov 3, 2019 at 3:15 PM 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

pgsql-general by date:

Previous
From: Ashok Kumar Tiwari
Date:
Subject: Create a logical and physical replication
Next
From: Tom Lane
Date:
Subject: Re: explain plan difference