Description
|
SQL
|
List of Views with View Definition by Schema | SELECT schemaname, viewname, viewowner, pg_get_viewdef(viewname) as view_def
FROM pg_views
WHERE schemaname = 'odslov'
ORDER BY 1; |
List of Functions with Definition by Schema | SELECT
n.nspname AS function_schema,
p.proname AS function_name,
pg_get_functiondef(p.oid) as function_def
FROM
pg_proc p
LEFT JOIN pg_namespace n ON p.pronamespace = n.oid
WHERE
n.nspname = 'odsmgr'
ORDER BY 1, 2 |
List of tables by Schema | SELECT schemaname, tablename
FROM pg_tables
WHERE schemaname = 'odsmgr'
ORDER BY 1 |
List of Indexes with Definition by Schema | SELECT schemaname, tablename, indexname, indexdef
FROM pg_indexes
WHERE schemaname = 'odsmgr'
ORDER BY 2, 3 |