Chapter 55. System Views

Table of Contents

55.1. Overview
55.2. pg_aios
55.3. pg_available_extensions
55.4. pg_available_extension_versions
55.5. pg_backend_memory_contexts
55.6. pg_config
55.7. pg_cursors
55.8. pg_file_settings
55.9. pg_group
55.10. pg_hba_file_rules
55.11. pg_ident_file_mappings
55.12. pg_indexes
55.13. pg_locks
55.14. pg_matviews
55.15. pg_policies
55.16. pg_prepared_statements
55.17. pg_prepared_xacts
55.18. pg_publication_tables
55.19. pg_replication_origin_status
55.20. pg_replication_slots
55.21. pg_roles
55.22. pg_rules
55.23. pg_seclabels
55.24. pg_sequences
55.25. pg_settings
55.26. pg_shadow
55.27. pg_shmem_allocations
55.28. pg_shmem_allocations_numa
55.29. pg_stats
55.30. pg_stats_ext
55.31. pg_stats_ext_exprs
55.32. pg_tables
55.33. pg_timezone_abbrevs
55.34. pg_timezone_names
55.35. pg_user
55.36. pg_user_mappings
55.37. pg_views
55.38. pg_wait_events

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 55.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 27.2.