Not a solution to the above question but if you want to access the information about the last query that was executed then you can do this:
SELECT execution_time FROM SYS_QUERY_HISTORY WHERE query_id = pg_last_query_id();