Created
February 28, 2014 13:42
-
-
Save rdeavila/9271316 to your computer and use it in GitHub Desktop.
PostgreSQL: Lista de todas as tabelas, ordenada por nro. de registros.
This file contains 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
-- Usa as estatísticas do PostgreSQL para a contagem. | |
-- Para números mais precisos, execute | |
-- VACUUM ANALYZE | |
-- antes de iniciar. | |
SELECT | |
relname, | |
n_live_tup | |
FROM | |
pg_stat_user_tables | |
ORDER BY | |
n_live_tup DESC; |
Como fazer uma tabela com psycopg2
Voce se refere criar a tabela em alguma linguagem tipo o "Python" usando o plugin psycopg2 ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Como fazer uma tabela com psycopg2