Search Postgresql Archives

Re: How do write schema independent install files for functions.

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

 



On 16/07/2012 20:44, Tom Lane wrote:
> Philip Couling <phil@xxxxxxxxxxx> 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
> 

Thanks tom. That was exactly what I was looking for and what I'd missed
in the manual.

For the sake of future readers "FROM CURRENT" is documented here:
http://www.postgresql.org/docs/current/static/sql-createfunction.html

Regards

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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