I have a query which is taking 40 seconds to execute over the 80ms that it should if postgres where to filter off the primary key rather than doing a sequential scan. I have to force postgres to filter off the index by setting the above flag.
Having to stick this into the UDF seems like quite a hack to me, I mean it's unreasonable IMO that the query planner is chosing a seq scan over a indexed filter. Most of my SQL experience is off SQL Server, and I haven't experienced it missplaning such basic optimizations.
Edit: To anyone interested, the query exeuction time droped from 80ms to 27 ms with 9.2, holly molley.
EXPLAIN ANALYZE
on the misplanned query. See Using EXPLAIN for tips. Basic planning mistakes are generally due to non-existent statistics.