xxxxxxxxxx
SELECT
table_name,
column_name,
data_type,
character_maximum_length,
is_nullable
FROM
information_schema.columns
WHERE
table_schema = 'your_schema_name'
ORDER BY
table_name,
ordinal_position;
xxxxxxxxxx
SELECT table_name, column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'public'; -- Replace 'public' with the desired schema name