Re: Modifying search_path in a stored procedure

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Eric Brown <eric(dot)brown(at)propel(dot)com>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Modifying search_path in a stored procedure
Date: 2005-01-11 21:55:54
Message-ID: 20050111215554.GA43087@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 11, 2005 at 01:19:55PM -0800, Eric Brown wrote:

> I know I can SET the schema search_path in a stored procedure, but is
> there any way to retrieve it first so that I can get the current value
> and manipulate that rather than just replace it?

See the current_setting() and set_config() functions in the "Functions
and Operators" chapter of the documentation. In 7.3 and 7.4 they're
in the "Miscellaneous Functions" section; in 8.0 they're in "System
Administration Functions."

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-01-11 22:46:43 Re: Modifying search_path in a stored procedure
Previous Message Eric Brown 2005-01-11 21:19:55 Modifying search_path in a stored procedure