Re: Casts in foreign schemas - Mailing list pgsql-sql

From Tom Lane
Subject Re: Casts in foreign schemas
Date
Msg-id 4764.1276008642@sss.pgh.pa.us
Whole thread Raw
In response to Casts in foreign schemas  (Ben Morrow <ben@morrow.me.uk>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Ben Morrow
Date:
Subject: Casts in foreign schemas
Next
From: Aaron Burnett
Date:
Subject: Some insight on the proper SQL would be appreciated