Useful CodeQL scripts for doing static analysis on projects based on PostgreSQL.
-
return-in-PG_TRY.ql for detecting suspicious control flow statements inside PG_TRY block.
-
volatile-in-PG_TRY.ql for detecting missed qualifiers for variables used in the PG_TRY, PG_CATCH block.
-
typedef-checker.ql for detecting suspicious typedef casting. The idea is not proposed by myself but by Dmitry Dolgov in https://www.postgresql.org/message-id/flat/20230803165638.nyjgdqxg7korp54r%40erthalion.local