Skip to content

Instantly share code, notes, and snippets.

@timotta
Created October 2, 2019 13:10
Show Gist options
  • Save timotta/311aec74b20192588f42e9d22c14fc00 to your computer and use it in GitHub Desktop.
Save timotta/311aec74b20192588f42e9d22c14fc00 to your computer and use it in GitHub Desktop.
-- show tables
SELECT * FROM pg_catalog.pg_tables;
-- describe table
select column_name, data_type, character_maximum_length from INFORMATION_SCHEMA.COLUMNS where table_name = 'tablename';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment