I hope the title is self-descriptive. I want to be able somehow to translate any Postgres meta-command into its corresponding/underlying SQL query, at least to learn more about Postgres and the way it stores meta-info in its tables.
Any ideas if this is possible?
E.g.:
When connected to the database EXAMPLE,
\dt
and SELECT table_schema,table_name FROM information_schema.tables ORDER BY table_schema,table_name;
return the same result.
I want to find, if possible, a way to obtain the value SELECT table_schema,table_name FROM information_schema.tables ORDER BY table_schema,table_name;
when inputting \dt
to the function/macro/whatever.