Verbose output
If you're interested in what columns are actually being passed around by your queries, an explain plan using VERBOSE
will show them:
EXPLAIN VERBOSE SELECT * FROM customers; QUERY PLAN ---------- Seq Scan on public.customers (cost=0.00..676.00 rows=20000 width=268) Output: customerid, firstname, lastname, address1, address2, city, state, zip, country, region, email, phone, creditcardtype, creditcard, creditcardexpiration, username, password, age, income, gender
This can be valuable in extremely complicated queries where it's not easy to figure out on your own, or when running queries generated by programs like an Object Relational Mapper (ORM) that sometimes include more information than they necessarily need to.