okbob/plpgsql_check — pull request #4 by johto (2014-04-15 20:57:30+00:00)
Title: Check input expressions more strictly against their targets

Hi,

I think this is the next think I'd like to improve. It's a bit annoying that PL/PgSQL allows you to assign an expression of *any* type without any complaints; a simple typo could lead to run-time errors later in cases which could have been caught through static analysis. The idea is to elevate the warning's "priority" to a visible-by-default one if there's no implicit cast from the source type to the target type.

I've done some initial testing and it appears to be working, but I'll be running it against our code base again tomorrow to see how it really works in production.