Chapter 44. System Catalogs

Table of Contents
44.1. Overview
44.2. pg_aggregate
44.3. pg_am
44.4. pg_amop
44.5. pg_amproc
44.6. pg_attrdef
44.7. pg_attribute
44.8. pg_authid
44.9. pg_auth_members
44.10. pg_cast
44.11. pg_class
44.12. pg_constraint
44.13. pg_conversion
44.14. pg_database
44.15. pg_depend
44.16. pg_description
44.17. pg_enum
44.18. pg_foreign_data_wrapper
44.19. pg_foreign_server
44.20. pg_index
44.21. pg_inherits
44.22. pg_language
44.23. pg_largeobject
44.24. pg_listener
44.25. pg_namespace
44.26. pg_opclass
44.27. pg_operator
44.28. pg_opfamily
44.29. pg_pltemplate
44.30. pg_proc
44.31. pg_rewrite
44.32. pg_shdepend
44.33. pg_shdescription
44.34. pg_statistic
44.35. pg_tablespace
44.36. pg_trigger
44.37. pg_ts_config
44.38. pg_ts_config_map
44.39. pg_ts_dict
44.40. pg_ts_parser
44.41. pg_ts_template
44.42. pg_type
44.43. pg_user_mapping
44.44. System Views
44.45. pg_cursors
44.46. pg_group
44.47. pg_indexes
44.48. pg_locks
44.49. pg_prepared_statements
44.50. pg_prepared_xacts
44.51. pg_roles
44.52. pg_rules
44.53. pg_settings
44.54. pg_shadow
44.55. pg_stats
44.56. pg_tables
44.57. pg_timezone_abbrevs
44.58. pg_timezone_names
44.59. pg_user
44.60. pg_user_mappings
44.61. pg_views

The system catalogs are the place where a relational database management system stores schema metadata, such as information about tables and columns, and internal bookkeeping information. PostgreSQL's system catalogs are regular tables. You can drop and recreate the tables, add columns, insert and update values, and severely mess up your system that way. Normally, one should not change the system catalogs by hand, there are always SQL commands to do that. (For example, CREATE DATABASE inserts a row into the pg_database catalog — and actually creates the database on disk.) There are some exceptions for particularly esoteric operations, such as adding index access methods.