Re: search_path and current_schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: search_path and current_schema
Date: 2013-10-27 16:25:06
Message-ID: 15843.1382891106@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com> writes:
> I thought current_schemas and search_path will return the same set of
> schemas (except that current_schema will show pg_catalog also, if we use
> true). Shouldn't mynewschema appear in the output of select
> current_schemas(true)?

Only if it actually exists (and you have usage privilege on it). See
the description of the search_path variable: nonexistent entries are
silently ignored.

Possibly this behavior should be documented under current_schemas()
as well as under the GUC variable.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert James 2013-10-27 19:47:16 Work table
Previous Message Jayadevan M 2013-10-27 16:19:18 search_path and current_schema