Patches for check_pgsql.c check plugin for Postgres DB [sf#1516150] [#679]