2013-07-24 15:11:35.895 CST,"db_test",17526,"192.168.100.221:40188",51ed7b10.4476,1555,"BIND",2013-07-23 02:33:52 CST,236/820620,ERROR,0A000,"cached plan must not change result type","SELECT pkg_name FROM tbl_test WHERE channel_no = $1 AND store_id = $2","RevalidateCachedPlan,plancache.c:589","" |
francs=> create table test_cache (id int4,name character varying(32));
CREATE TABLE
francs=> insert into test_cache values (1,'a'),(2,'b'),(3,'c');
INSERT 0 3
francs=> select * from test_cache ;
id | name
----+------
1 | a
2 | b
3 | c
(3 rows)
|
francs=> PREPARE select_1 (character varying) AS
francs-> select * From test_cache where name=$1;
PREPARE
francs=> EXECUTE select_1('a');
id | name
----+------
1 | a
(1 row)
|
francs=> \d test_cache
Table "francs.test_cache"
Column | Type | Modifiers
--------+-----------------------+-----------
id | integer |
name | character varying(32) |
francs=> alter table test_cache alter column name type character varying;
ALTER TABLE
|
francs=> EXECUTE select_1('a');
ERROR: cached plan must not change result type
|
2013-07-24 15:19:36.139 CST,"francs",23261,"[local]",51ef7f33.5add,1,"EXECUTE",2013-07-24 15:16:03 CST,3/10083,ERROR,"cached plan must not change result type","EXECUTE select_1('a');","psql" |
francs=> DEALLOCATE select_1;
DEALLOCATE
francs=> PREPARE select_1 (character varying) AS
francs-> select * From test_cache where name=$1;
PREPARE
francs=> EXECUTE select_1('a');
id | name
----+------
1 | a
(1 row)
|