Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Postgres \ commands are incredible shortcuts that are a pain to write in sql. E.g.

\dt+ translates to

SELECT schemaname, tablename, tableowner, tablespace, pg_size_pretty(pg_total_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename))) AS total_size FROM pg_tables ORDER BY pg_total_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename)) DESC;



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: