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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Couling <phil(at)pedal(dot)me(dot)uk>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do write schema independent install files for functions.
Date: 2012-07-16 19:44:08
Message-ID: 24628.1342467848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Philip Couling <phil(at)pedal(dot)me(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bartosz Dmytrak 2012-07-16 19:45:30 Re: How do write schema independent install files for functions.
Previous Message Daniele Varrazzo 2012-07-16 19:35:08 Re: Can't figure out how to use now() in default for tsrange column (PG 9.2)