Chapter 60. System Catalogs

Table of Contents

60.1. Overview
60.2. pg_aggregate
60.3. pg_am
60.4. pg_amop
60.5. pg_amproc
60.6. pg_attrdef
60.7. pg_attribute
60.8. pg_authid
60.9. pg_auth_members
60.10. pg_cast
60.11. pg_class
60.12. pg_collation
60.13. pg_constraint
60.14. pg_conversion
60.15. pg_database
60.16. pg_db_role_setting
60.17. pg_default_acl
60.18. pg_depend
60.19. pg_description
60.20. pg_enum
60.21. pg_event_trigger
60.22. pg_extension
60.23. pg_foreign_data_wrapper
60.24. pg_foreign_server
60.25. pg_foreign_table
60.26. pg_index
60.27. pg_inherits
60.28. pg_init_privs
60.29. pg_language
60.30. pg_largeobject
60.31. pg_largeobject_metadata
60.32. pg_namespace
60.33. pg_opclass
60.34. pg_operator
60.35. pg_opfamily
60.36. pg_parameter_acl
60.37. pg_partitioned_table
60.38. pg_policy
60.39. pg_proc
60.40. pg_publication
60.41. pg_publication_namespace
60.42. pg_publication_rel
60.43. pg_range
60.44. pg_replication_origin
60.45. pg_rewrite
60.46. pg_seclabel
60.47. pg_sequence
60.48. pg_shdepend
60.49. pg_shdescription
60.50. pg_shseclabel
60.51. pg_statistic
60.52. pg_statistic_ext
60.53. pg_statistic_ext_data
60.54. pg_subscription
60.55. pg_subscription_rel
60.56. pg_tablespace
60.57. pg_transform
60.58. pg_trigger
60.59. pg_ts_config
60.60. pg_ts_config_map
60.61. pg_ts_dict
60.62. pg_ts_parser
60.63. pg_ts_template
60.64. pg_type
60.65. pg_user_mapping

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 normally 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, but many of those have been made available as SQL commands over time, and so the need for direct manipulation of the system catalogs is ever decreasing.