-- The resolved results are omitted from the function output BEGIN; -- Run for the first time to get results SELECT 1 FROM run_isok_queries() AS riq; ?column? ---------- 1 1 1 1 1 1 (6 rows) -- Update the warnings so they are resolved. UPDATE isok_results SET resolved = first_seen WHERE iqname = 'query1'; -- Examine what happens when we run again. -- Omit the role, search_path, and (non-NULL) timestamps from the -- column list, they change and cause the test to fail. -- We should get nothing for query1. SELECT irid, iqname, deferred_to, category , keep_until, qr_id, qr_message, qr_extra, notes FROM run_isok_queries() AS riq ORDER BY riq.irid; irid | iqname | deferred_to | category | keep_until | qr_id | qr_message | qr_extra | notes ------+-------------+-------------+----------+------------+-------+-----------------+----------+------- 1 | errorquery2 | | | | R4 | Result number 4 | | 2 | errorquery2 | | | | R5 | Result number 5 | | 3 | errorquery2 | | | | R6 | Result number 6 | | (3 rows) ROLLBACK; -- Cleanup -- Reset the sequence so what this test did is ignored. SELECT setval('isok_results_irid_seq', 1, FALSE); setval -------- 1 (1 row)