Chapter 54. System Catalogs

Table of Contents

54.1. Overview
54.2. pg_aggregate
54.3. pg_am
54.4. pg_amop
54.5. pg_amproc
54.6. pg_attrdef
54.7. pg_attribute
54.8. pg_attrmask
54.9. pg_authid
54.10. pg_auth_members
54.11. pg_cast
54.12. pg_class
54.13. pg_collation
54.14. pg_constraint
54.15. pg_conversion
54.16. pg_database
54.17. pg_db_role_setting
54.18. pg_default_acl
54.19. pg_depend
54.20. pg_description
54.21. pg_enum
54.22. pg_event_trigger
54.23. pg_extension
54.24. pg_foreign_data_wrapper
54.25. pg_foreign_server
54.26. pg_foreign_table
54.27. pg_index
54.28. pg_inherits
54.29. pg_init_privs
54.30. pg_language
54.31. pg_largeobject
54.32. pg_largeobject_metadata
54.33. pg_namespace
54.34. pg_opclass
54.35. pg_operator
54.36. pg_opfamily
54.37. pg_parameter_acl
54.38. pg_partitioned_table
54.39. pg_policy
54.40. pg_proc
54.41. pg_publication
54.42. pg_publication_namespace
54.43. pg_publication_rel
54.44. pg_range
54.45. pg_replication_origin
54.46. pg_rewrite
54.47. pg_seclabel
54.48. pg_sequence
54.49. pg_shdepend
54.50. pg_shdescription
54.51. pg_shseclabel
54.52. pg_statistic
54.53. pg_statistic_ext
54.54. pg_statistic_ext_data
54.55. pg_subscription
54.56. pg_subscription_rel
54.57. pg_tablespace
54.58. pg_transform
54.59. pg_trigger
54.60. pg_ts_config
54.61. pg_ts_config_map
54.62. pg_ts_dict
54.63. pg_ts_parser
54.64. pg_ts_template
54.65. pg_type
54.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.