May 17, 2026, 11:40 PM

This commit is contained in:
Paweł Domański
2026-05-18 06:40:19 +00:00
commit 64944cf004
896 changed files with 310709 additions and 0 deletions
@@ -0,0 +1,17 @@
SELECT c.table_schema,
c.table_name as table,
c.ordinal_position as order,
c.column_name as column,
-- c.data_type as type,
CASE WHEN c.data_type IN ('character', 'varchar') THEN c.data_type || '(' || c.character_maximum_length || ')'
WHEN c.data_type IN ('numeric') THEN c.data_type || '(' || c.numeric_precision || ',' || c.numeric_scale || ')'
ELSE c.data_type
END,
-- c.character_maximum_length as max_len,
c.is_nullable as null,
col_description(t.oid, c.ordinal_position)
FROM information_schema.columns c
JOIN pg_class t ON (t.relname = c.table_name)
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
ORDER BY 1, 2, 3;