Chapter 61. System Views

Table of Contents

61.1. Overview
61.2. pg_available_extensions
61.3. pg_available_extension_versions
61.4. pg_backend_memory_contexts
61.5. pg_config
61.6. pg_cursors
61.7. pg_file_settings
61.8. pg_group
61.9. pg_hba_file_rules
61.10. pg_ident_file_mappings
61.11. pg_indexes
61.12. pg_locks
61.13. pg_matviews
61.14. pg_policies
61.15. pg_prepared_statements
61.16. pg_prepared_xacts
61.17. pg_publication_tables
61.18. pg_replication_origin_status
61.19. pg_replication_slots
61.20. pg_roles
61.21. pg_rules
61.22. pg_seclabels
61.23. pg_sequences
61.24. pg_settings
61.25. pg_shadow
61.26. pg_shmem_allocations
61.27. pg_stats
61.28. pg_stats_ext
61.29. pg_stats_ext_exprs
61.30. pg_tables
61.31. pg_timezone_abbrevs
61.32. pg_timezone_names
61.33. pg_user
61.34. pg_user_mappings
61.35. pg_views

In addition to the system catalogs, PostgreSQL provides a number of built-in views. Some system views provide convenient access to some commonly used queries on the system catalogs. Other views provide access to internal server state.

The information schema (Chapter 37) provides an alternative set of views which overlap the functionality of the system views. Since the information schema is SQL-standard whereas the views described here are PostgreSQL-specific, it's usually better to use the information schema if it provides all the information you need.

Table 61.1 lists the system views described here. More detailed documentation of each view follows below. There are some additional views that provide access to accumulated statistics; they are described in Table 28.2.