Robert>Are you really seeing the same behavior in all versions?
I do not have "pre 9.1" at hand, however all 9.1, 9.2, 9.3, 9.4, and
9.5 are affected.
9.1 just silently executes "old statement" as if search_path was not
modified at all.
9.2, 9.3, 9.4, and 9.5 all fail with "cached plan must not change
result type" error.
See java-based test in , and build logs for 9.1-9.4 in 
I do not have "brand new 9.5", however I think 9.5rc1 is good enough:
"PostgreSQL 9.5rc1 on x86_64-apple-darwin15.2.0, compiled by Apple
LLVM version 7.0.0 (clang-700.1.76), 64-bit"
Here's my test case:
create schema customer1;
create table customer1.test(i int4);
create schema customer2;
create table customer2.test(i varchar);
set search_path to customer1,public;
prepare stmt as select * from test;
set search_path to customer2,public;
--ERROR: cached plan must not change result type
--SQL state: 0A000
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: