Search Postgresql Archives

Re: Modifying search_path in a stored procedure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Brown <eric.brown@xxxxxxxxxx> writes:
> 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?

current_setting() would produce the value you want to give back to SET
(or more likely set_config()).  There's also current_schema() and
current_schemas() if you want a more digested form.  See "System
Information Functions" and "System Administration Functions" in TFM.

It might also be that SET LOCAL would solve your problem with less fuss.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux