Re: [SQL] Casts in foreign schemas

2010-06-08 Thread Tom Lane
Ben Morrow 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

[SQL] Casts in foreign schemas

2010-06-08 Thread Ben Morrow
Is this behaviour expected? (This is with 8.4.3 on FreeBSD.) create schema one; set search_path to one; create type foo as (x integer); create function foo (integer) returns foo language plpgsql as $$ declare y foo; begin