From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ben Morrow <ben@morrow.me.uk>
Cc: pgsql-sql@postgresql.org
Subject: Re: Casts in foreign schemas
Date: Tue, 08 Jun 2010 10:50:42 -0400
Message-ID: <4764.1276008642@sss.pgh.pa.us> (raw)
In-Reply-To: <20100608143327.GA67823@osiris.mauzo.dyndns.org>
References: <20100608143327.GA67823@osiris.mauzo.dyndns.org>
Ben Morrow <ben@morrow.me.uk> writes:
> My understanding of things was that PL/pgSQL functions were compiled at
> CREATE FUNCTION time, using the SEARCH_PATH currently in effect. Is that
> wrong?
Yes. They're compiled at first use within a given session.
If you want to lock down the search path used by a function, it's
possible to do that in recent PG versions, by annotating the function
definition with a "SET search_path = whatever" clause.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, ben@morrow.me.uk
Subject: Re: Casts in foreign schemas
In-Reply-To: <4764.1276008642@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox