Re: select view definition from pg_views feature request

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Shapiro <mshapiro51(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: select view definition from pg_views feature request
Date: 2019-11-03 21:15:23
Message-ID: 31367.1572815723@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Baldwin 2019-11-04 03:14:03 explain plan difference
Previous Message Michael Shapiro 2019-11-03 20:33:55 select view definition from pg_views feature request