pg_stats knows the table oid
pg_stats gained tableid (oid of the table) and attnum, so no name join is needed.
task
For shop.orders return attnum and attname from pg_stats, using tableid = 'shop.orders'::regclass, ordered by attnum.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
pg_stats gained tableid (oid of the table) and attnum, so no name join is needed.
For shop.orders return attnum and attname from pg_stats, using tableid = 'shop.orders'::regclass, ordered by attnum.