Chapter 55. System Catalogs

Table of Contents

55.1. Overview
55.2. pg_aggregate
55.3. pg_am
55.4. pg_amop
55.5. pg_amproc
55.6. pg_attrdef
55.7. pg_attribute
55.8. pg_attrmask
55.9. pg_authid
55.10. pg_auth_members
55.11. pg_cast
55.12. pg_class
55.13. pg_collation
55.14. pg_constraint
55.15. pg_conversion
55.16. pg_database
55.17. pg_db_role_setting
55.18. pg_default_acl
55.19. pg_depend
55.20. pg_description
55.21. pg_enum
55.22. pg_event_trigger
55.23. pg_extension
55.24. pg_foreign_data_wrapper
55.25. pg_foreign_server
55.26. pg_foreign_table
55.27. pg_index
55.28. pg_inherits
55.29. pg_init_privs
55.30. pg_language
55.31. pg_largeobject
55.32. pg_largeobject_metadata
55.33. pg_namespace
55.34. pg_opclass
55.35. pg_operator
55.36. pg_opfamily
55.37. pg_parameter_acl
55.38. pg_partitioned_table
55.39. pg_policy
55.40. pg_proc
55.41. pg_publication
55.42. pg_publication_namespace
55.43. pg_publication_rel
55.44. pg_range
55.45. pg_replication_origin
55.46. pg_rewrite
55.47. pg_seclabel
55.48. pg_sequence
55.49. pg_shdepend
55.50. pg_shdescription
55.51. pg_shseclabel
55.52. pg_statistic
55.53. pg_statistic_ext
55.54. pg_statistic_ext_data
55.55. pg_subscription
55.56. pg_subscription_rel
55.57. pg_tablespace
55.58. pg_transform
55.59. pg_trigger
55.60. pg_ts_config
55.61. pg_ts_config_map
55.62. pg_ts_dict
55.63. pg_ts_parser
55.64. pg_ts_template
55.65. pg_type
55.66. 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.