2 ms·
You can use "select * from pg_stat_user_tables" etc. Admittedly the internal tables and views have a bit of a learning curve and are a little bit obscure (and
by arp242 4y ago
You can use "select * from pg_stat_user_tables" etc.
Admittedly the internal tables and views have a bit of a learning curve and are a little bit obscure (and inconsistent) at times, but it's much nicer and much more flexible.
The CLI stuff like \d are just "aliases" for queries; \set echo_hidden shows them.
- bornfreddy 4y agoOf course you can, but that is beside the point. Convenience matters - besides, these approaches can coexist, adding those simple queries (as aliases) should be trivial.
- arp242 4y agoSHOW has well-defined consistent semantics. Adding "special shortcuts" doesn't seem like much of an improvement. From the CLI \d etc. seems just as easy (easier actually), and you can add your own shortcuts if you want. From outside the CLI, this sort of introspection is rare enough I don't really see the point in making special shortcuts for it.