Chapter 56. System Views

Table of Contents

56.1. Overview
56.2. pg_available_extensions
56.3. pg_available_extension_versions
56.4. pg_backend_memory_contexts
56.5. pg_config
56.6. pg_cursors
56.7. pg_file_settings
56.8. pg_group
56.9. pg_hba_file_rules
56.10. pg_ident_file_mappings
56.11. pg_indexes
56.12. pg_locks
56.13. pg_matviews
56.14. pg_policies
56.15. pg_prepared_statements
56.16. pg_prepared_xacts
56.17. pg_publication_tables
56.18. pg_replication_origin_status
56.19. pg_replication_slots
56.20. pg_roles
56.21. pg_rules
56.22. pg_seclabels
56.23. pg_sequences
56.24. pg_settings
56.25. pg_shadow
56.26. pg_shmem_allocations
56.27. pg_stats
56.28. pg_stats_ext
56.29. pg_stats_ext_exprs
56.30. pg_tables
56.31. pg_timezone_abbrevs
56.32. pg_timezone_names
56.33. pg_user
56.34. pg_user_mappings
56.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 39) 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 56.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.