Skip to content

Instantly share code, notes, and snippets.

@maxcollombin
Created February 10, 2024 08:42
Show Gist options
  • Save maxcollombin/7955faad764d4e81db026b6c29dfdf0c to your computer and use it in GitHub Desktop.
Save maxcollombin/7955faad764d4e81db026b6c29dfdf0c to your computer and use it in GitHub Desktop.
PostgreSQL script to retrieve table attributes in schema
SELECT
table_name,
column_name,
is_nullable,
data_type,
character_maximum_length
FROM
information_schema.columns
WHERE
table_schema = 'siges'
ORDER BY
table_name,
ordinal_position;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment