InicioApuntes Y Monografiascrear diccionario de datos en postgres
LISTAR TODAS LAS TABLAS DE UNA BASE
Para correr estos querys primero deben estar conectados en la base de donde requieran sacar el listado de las tablas

--LISTAR TODAS LAS TABLAS DE UNA BASE
select * from pg_catalog.pg_stat_user_tables
order by schemaname

--LISTAR TODAS LAS TABLAS DE UNA BASE CON DESCRIPCION
select * from pg_catalog.pg_stat_user_tables ut,pg_catalog.pg_description des
where ut.relid=des.objoid



select a.*, b.*, c.*
from pg_class a, pg_attribute b, pg_type c
where a.relname = 'tabla1'
and b.attrelid = a.relfilenode
and b.attnum >0
and b.atttypid = c.oid


select *,description
from information_schema.columns,pg_description
where table_name = 'tabla1';

SELECT c.table_schema,c.table_name,c.column_name,c.data_type ||'(' || c.character_maximum_length ||')' ,c.is_nullable,c.column_default,pgd.description FROM
pg_catalog.pg_statio_all_tables as st inner join pg_catalog.pg_description pgd on
(pgd.objoid=st.relid) inner join information_schema.columns c on (pgd.objsubid=c.ordinal_position and
c.table_schema=st.schemaname and c.table_name=st.relname);
Datos archivados del Taringa! original
20puntos
3,134visitas
0comentarios
Actividad nueva en Posteamelo
0puntos
3visitas
0comentarios
Dar puntos:

Dejá tu comentario

0/2000

Autor del Post

j
jubidia🇦🇷
Usuario
Puntos0
Posts17
Ver perfil →
PosteameloArchivo Histórico de Taringa! (2004-2017). Preservando la inteligencia colectiva de la internet hispanohablante.

CONTACTO

18 de Septiembre 455, Casilla 52

Chillán, Región de Ñuble, Chile

Solo correo postal

© 2026 Posteamelo.com. No afiliado con Taringa! ni sus sucesores.

Contenido preservado con fines históricos y culturales.