Re: search_path for database vs user vs session

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Moshe Jacobson <moshe(at)neadwerx(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: search_path for database vs user vs session
Date: 2013-05-27 18:47:06
Message-ID: 51A3AA2A.8080804@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/27/2013 11:29 AM, Moshe Jacobson wrote:
> How can I show the value of search_path for the database, the user and
> the session?
> I ask because I cannot explain the following:
>
> $ psql -U postgres -d ises
> psql (9.1.4)
> Type "help" for help.
>
> postgres(at)moshe=>devmain:ises=# show search_path;
> search_path
> -------------------
> public, audit_log
> (1 row)
>
> postgres(at)moshe=>devmain:ises=# alter database ises set search_path
> to public, auditlog;
> ALTER DATABASE
>
> postgres(at)moshe=>devmain:ises=# \q
> $ psql -U postgres -d ises
> psql (9.1.4)
> Type "help" for help.
>
> postgres(at)moshe=>devmain:ises=# show search_path;
> search_path
> -------------------
> public, audit_log
> (1 row)

Is the below what you are looking for?

http://www.postgresql.org/docs/9.2/static/runtime-config-client.html

"The current effective value of the search path can be examined via the
SQL function current_schemas (see Section 9.25). This is not quite the
same as examining the value of search_path, since current_schemas shows
how the items appearing in search_path were resolved."

Section 9.25:

http://www.postgresql.org/docs/9.2/static/functions-info.html

>
>
> Thanks.
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Moshe Jacobson 2013-05-27 19:07:10 Re: search_path for database vs user vs session
Previous Message Moshe Jacobson 2013-05-27 18:29:13 search_path for database vs user vs session