-- Give run_isok_queries() an IQName that's not on ISOK_QUERIES -- and see we get a good error message. SELECT * FROM run_isok_queries($$VALUES ('non_existant_iqname')$$); ERROR: run_isok_queries: Error executing supplied query argument DETAIL: The error is: Error in run_isok_queries(TEXT) The detail is: Supplied query returned a value (non_existant_iqname) that is not an existing ISOK_QUERIES.IQName value The query is: VALUES ('non_existant_iqname') Additional diagnostic information: PL/pgSQL function run_isok_queries(text) line 68 at RAISE CONTEXT: PL/pgSQL function run_isok_queries(text) line 422 at RAISE