You can see which psql queries are running by running it with the -E option, then running the usual commands:
In this case, the one that came down first looked at your oid table:
SELECT c.oid, n.nspname, c.relname FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relname ~ '^(YOUR_TABLE_NAME_HERE)$' AND pg_catalog.pg_table_is_visible(c.oid) ORDER BY 2, 3;
then he does this to find more statistics about this:
SELECT a.attname, pg_catalog.format_type(a.atttypid, a.atttypmod), (SELECT substring(pg_catalog.pg_get_expr(d.adbin, d.adrelid) for 128) FROM pg_catalog.pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef), a.attnotnull, a.attnum, (SELECT c.collname FROM pg_catalog.pg_collation c, pg_catalog.pg_type t WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation <> t.typcollation) AS attcollation, NULL AS indexdef, NULL AS attfdwoptions, a.attstorage, CASE WHEN a.attstattarget=-1 THEN NULL ELSE a.attstattarget END AS attstattarget, pg_catalog.col_description(a.attrelid, a.attnum) FROM pg_catalog.pg_attribute a WHERE a.attrelid = '57692' AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum;
x.attrstorage is what you care about p is PLAIN, x ADVANCED. I put.
rogerdpack
source share