From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Michael Shapiro <mshapiro51@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: select view definition from pg_views feature request
Date: Tue, 05 Nov 2019 10:44:51 -0500
Message-ID: <9662.1572968691@sss.pgh.pa.us> (raw)
In-Reply-To: <a484eebb-49a8-1ce4-99e0-179dc3e6b276@aklaver.com>
References: <CAGCvxebwiB+b5y_jAj_TLX+S6CoNbVFkmPqc9wTU5FLeNUa5jQ@mail.gmail.com>
<31367.1572815723@sss.pgh.pa.us>
<CAGCvxeYArO8-tmFD1MzMP8nuAef25fhphPA6K38k6hV5jpoNEg@mail.gmail.com>
<a484eebb-49a8-1ce4-99e0-179dc3e6b276@aklaver.com>
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 11/5/19 6:43 AM, Michael Shapiro wrote:
>> Can I set search_path='' (ie to a string that does not match any
>> existing schema)? Would that be the proper way to guarantee that the
>> definition for any view will always be fully-qualified?
> [ example ]
If you read the documentation about search_path, you'll find out that
setting it to empty means that only the pg_catalog schema is present
in the effective search path (and maybe your pg_temp schema, if you
have created any temp tables). So system catalog references,
references to built-in functions and operators, and temp table names
will not be qualified. Everything else will be.
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, adrian.klaver@aklaver.com, mshapiro51@gmail.com
Subject: Re: select view definition from pg_views feature request
In-Reply-To: <9662.1572968691@sss.pgh.pa.us>
References: <CAGCvxebwiB+b5y_jAj_TLX+S6CoNbVFkmPqc9wTU5FLeNUa5jQ@mail.gmail.com> <31367.1572815723@sss.pgh.pa.us> <CAGCvxeYArO8-tmFD1MzMP8nuAef25fhphPA6K38k6hV5jpoNEg@mail.gmail.com> <a484eebb-49a8-1ce4-99e0-179dc3e6b276@aklaver.com> <9662.1572968691@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