Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Query for specific view
- ===
- SELECT column_name, data_type
- FROM information_schema.columns
- WHERE table_name = 'vw_some_view_name'
- ORDER BY ordinal_position;
- Query all tables and views within a database and/or schema
- ===
- SELECT table_catalog, table_schema, table_name, column_name, data_type, character_maximum_length
- FROM information_schema.columns
- WHERE table_name NOT LIKE 'pg_%'
- AND domain_schema IS NULL
- AND table_schema = 'allied'
- ORDER BY table_name, ordinal_position;
Advertisement
Add Comment
Please, Sign In to add comment