You can combine it with a PSQL connection and exec...
# sql
m
You can combine it with a PSQL connection and execute the query there as well