Created
December 23, 2020 17:32
-
-
Save leonardoAlonso/13d392819adad53251b7260812c62ddc to your computer and use it in GitHub Desktop.
Postgres commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Login postgres | |
| sudo -u postgres psql postgres | |
| psql -d odoo // in user with access granted | |
| */ | |
| /*Tamaño de una base de datos */ | |
| SELECT pg_database_size('ventas'); | |
| /*Tamano de una tabla*/ | |
| select pg_table_size('mail_message'); | |
| /*Pretty size*/ | |
| select pg_size_pretty(pg_table_size('mail_message')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment