From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Shapiro <mshapiro51@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: select view definition from pg_views feature request
Date: Sun, 03 Nov 2019 16:15:23 -0500
Message-ID: <31367.1572815723@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGCvxebwiB+b5y_jAj_TLX+S6CoNbVFkmPqc9wTU5FLeNUa5jQ@mail.gmail.com>
References: <CAGCvxebwiB+b5y_jAj_TLX+S6CoNbVFkmPqc9wTU5FLeNUa5jQ@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, mshapiro51@gmail.com
Subject: Re: select view definition from pg_views feature request
In-Reply-To: <31367.1572815723@sss.pgh.pa.us>
References: <CAGCvxebwiB+b5y_jAj_TLX+S6CoNbVFkmPqc9wTU5FLeNUa5jQ@mail.gmail.com> <31367.1572815723@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox