Re: How to inherit search_path from template

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Phui Hock <phuihock(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to inherit search_path from template
Date: 2010-09-10 01:41:53
Message-ID: AANLkTim6F7fzWaiHue5kAtJWmfkC+Qp=F6v5PRsWBzQo@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 9, 2010 at 7:13 AM, Phui Hock <phuihock(at)gmail(dot)com> wrote:
> Hi,
> How can I create a database template with altered search_path to be
> inherited by child databases? Say, I created a template named
> template_a with the following commands:

It doesn't really work that way -- GUC values are global, not per
database. You can however set them on the role and use them that way
-- that will probably work in your case. Just make a role for each
database. Another thing you can do is have your app immediately set
your search path upon login -- not a connection pooler friendly
approach though.

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-09-10 01:46:09 Re: User function canceling VACUUMDB utility
Previous Message Merlin Moncure 2010-09-10 01:35:07 Re: Dynamically update NEW columns in plpgsql trigger