Re: Casts in foreign schemas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ben Morrow <ben(at)morrow(dot)me(dot)uk>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Casts in foreign schemas
Date: 2010-06-08 14:50:42
Message-ID: 4764.1276008642@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ben Morrow <ben(at)morrow(dot)me(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Aaron Burnett 2010-06-08 17:04:41 Some insight on the proper SQL would be appreciated
Previous Message Ben Morrow 2010-06-08 14:33:27 Casts in foreign schemas