Re: warnings about invalid "search_path"

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Samba <saasira(at)gmail(dot)com>
Cc: Gabriele Bartolini <Gabriele(dot)Bartolini(at)2ndquadrant(dot)it>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: warnings about invalid "search_path"
Date: 2012-08-07 15:00:30
Message-ID: CAOR=d=1f_YGAxAhbAGbBAOsZHgpz4w-gdbKCfGW0UmhT1wOdnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 7, 2012 at 7:15 AM, Samba <saasira(at)gmail(dot)com> wrote:
> Thanks Gabriele for those pointers,
>
> I could now narrow it down to two things:
>
> "system_data" user logging into other databases [one of those may be the
> default 'postgres'] which does not have "system_data" schema
> other users [like 'postgres'] logging into their own or even other databases
> which does not have "system_data" schema.
>
> I did notice that we have added "system_data" schema to a few other users
> [roles] who are also supposed to login to the database containing
> "system_data" schema and that is causing this side-effect of logging these
> warning messages when users who have "system_data" in the search_path log
> into other databases that do not have "system_data" schema.
>
> So, what i understand is needed for me is "how to add a schema (or multiple
> schemas) in the search path for a database irrespective of whichever user
> logs in to the database?"
>
> Could you explain how to add "schema(s) into search_path for a database
> irrespective of the user logging-in?

You can set search path for a particular database:

alter database xyz set search_path='abc','xyz';

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-08-07 15:03:41 Re: Memory error in user-defined aggregation function
Previous Message Samba 2012-08-07 14:35:56 Re: warnings about invalid "search_path"