Since commit 912df3ef9b188c82893dace1e9b56c42a558fdba, check_pgsql exited UNKNOWN instead of OK if the new --query option was *not* specified. This bug is fixed now.
@@ -258,7 +258,7 @@ main (int argc, char **argv)
if (verbose)
printf("Closing connection\n");
PQfinish (conn);
- return (query_status > status) ? query_status : status;
+ return (pgquery && query_status > status) ? query_status : status;
}