Re: How do write schema independent install files for functions. - Mailing list pgsql-general

From Tom Lane
Subject Re: How do write schema independent install files for functions.
Date
Msg-id 24628.1342467848@sss.pgh.pa.us
Whole thread Raw
In response to How do write schema independent install files for functions.  (Philip Couling <phil@pedal.me.uk>)
Responses Re: How do write schema independent install files for functions.  (Philip Couling <phil@pedal.me.uk>)
List pgsql-general
Philip Couling <phil@pedal.me.uk> writes:
> I have a number of functions which I wish to wrap up in a SQL script
> (well technically DDL script).  The functions reference one another and
> for safety it is necessary for them to ether set the search_path or
> directly reference the schema for one another.

> I was wondering if there is good / recommended way to write the install
> script to easily install to an arbitrary schema.

CREATE FUNCTION's "SET search_path FROM CURRENT" option might help you.

            regards, tom lane

pgsql-general by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: Can't figure out how to use now() in default for tsrange column (PG 9.2)
Next
From: Bartosz Dmytrak
Date:
Subject: Re: How do write schema independent install files for functions.