As failures to use a generic plan goes, that one's fairly tame. I've
seen much worse. For example:
PREPARE foo(integer[]) AS SELECT * FROM complexview WHERE id = ANY ($1);
where the caller typically supplies 1-5 array elements (or any number
less than 10, because generic parameter arrays are assumed to have 10
elements). This one can be a massive performance regression between
9.1 and 9.2; the first guy who mentioned this on IRC was getting a 40x
slowdown (~20ms planning time vs. 0.5ms execution time).
--
Andrew (irc:RhodiumToad)