Глава 50. Системные каталоги
Содержание
- 50.1. Обзор
- 50.2.
pg_aggregate- 50.3.
pg_am- 50.4.
pg_amop- 50.5.
pg_amproc- 50.6.
pg_attrdef- 50.7.
pg_attribute- 50.8.
pg_authid- 50.9.
pg_auth_members- 50.10.
pg_cast- 50.11.
pg_class- 50.12.
pg_collation- 50.13.
pg_constraint- 50.14.
pg_conversion- 50.15.
pg_database- 50.16.
pg_db_role_setting- 50.17.
pg_default_acl- 50.18.
pg_depend- 50.19.
pg_description- 50.20.
pg_enum- 50.21.
pg_event_trigger- 50.22.
pg_extension- 50.23.
pg_foreign_data_wrapper- 50.24.
pg_foreign_server- 50.25.
pg_foreign_table- 50.26.
pg_index- 50.27.
pg_inherits- 50.28.
pg_init_privs- 50.29.
pg_language- 50.30.
pg_largeobject- 50.31.
pg_largeobject_metadata- 50.32.
pg_namespace- 50.33.
pg_opclass- 50.34.
pg_operator- 50.35.
pg_opfamily- 50.36.
pg_partitioned_table- 50.37.
pg_policy- 50.38.
pg_proc- 50.39.
pg_publication- 50.40.
pg_publication_rel- 50.41.
pg_range- 50.42.
pg_replication_origin- 50.43.
pg_rewrite- 50.44.
pg_seclabel- 50.45.
pg_sequence- 50.46.
pg_shdepend- 50.47.
pg_shdescription- 50.48.
pg_shseclabel- 50.49.
pg_statistic- 50.50.
pg_statistic_ext- 50.51.
pg_statistic_ext_data- 50.52.
pg_subscription- 50.53.
pg_subscription_rel- 50.54.
pg_tablespace- 50.55.
pg_transform- 50.56.
pg_trigger- 50.57.
pg_ts_config- 50.58.
pg_ts_config_map- 50.59.
pg_ts_dict- 50.60.
pg_ts_parser- 50.61.
pg_ts_template- 50.62.
pg_type- 50.63.
pg_user_mapping- 50.64. Системные представления
- 50.65.
pg_available_extensions- 50.66.
pg_available_extension_versions- 50.67.
pg_config- 50.68.
pg_cursors- 50.69.
pg_file_settings- 50.70.
pg_group- 50.71.
pg_hba_file_rules- 50.72.
pg_indexes- 50.73.
pg_locks- 50.74.
pg_matviews- 50.75.
pg_policies- 50.76.
pg_prepared_statements- 50.77.
pg_prepared_xacts- 50.78.
pg_publication_tables- 50.79.
pg_replication_origin_status- 50.80.
pg_replication_slots- 50.81.
pg_roles- 50.82.
pg_rules- 50.83.
pg_seclabels- 50.84.
pg_sequences- 50.85.
pg_settings- 50.86.
pg_shadow- 50.87.
pg_shmem_allocations- 50.88.
pg_stats- 50.89.
pg_stats_ext- 50.90.
pg_tables- 50.91.
pg_timezone_abbrevs- 50.92.
pg_timezone_names- 50.93.
pg_user- 50.94.
pg_user_mappings- 50.95.
pg_views - 50.2.
Системные каталоги — это место, где система управления реляционной базой данных хранит метаданные схемы, в частности информацию о таблицах и столбцах, а также служебные сведения. Системные каталоги Postgres Pro представляют собой обычные таблицы. Поэтому вы можете удалить и пересоздать их, добавить столбцы, изменить и добавить строки, т. е. разными способами вмешаться в работу системы. Обычно модифицировать системные каталоги вручную не следует, для всего этого, как правило, есть команды SQL. (Например, CREATE DATABASE вставляет строку в каталог pg_database — и фактически создаёт базу данных на диске.) Исключение составляют только особенные эзотерические операции, но многие из них со временем становятся выполнимыми посредством SQL-команд, так что потребность напрямую модифицировать системные каталоги постоянно уменьшается.
Chapter 50. System Catalogs
Table of Contents
- 50.1. Overview
- 50.2.
pg_aggregate- 50.3.
pg_am- 50.4.
pg_amop- 50.5.
pg_amproc- 50.6.
pg_attrdef- 50.7.
pg_attribute- 50.8.
pg_authid- 50.9.
pg_auth_members- 50.10.
pg_cast- 50.11.
pg_class- 50.12.
pg_collation- 50.13.
pg_constraint- 50.14.
pg_conversion- 50.15.
pg_database- 50.16.
pg_db_role_setting- 50.17.
pg_default_acl- 50.18.
pg_depend- 50.19.
pg_description- 50.20.
pg_enum- 50.21.
pg_event_trigger- 50.22.
pg_extension- 50.23.
pg_foreign_data_wrapper- 50.24.
pg_foreign_server- 50.25.
pg_foreign_table- 50.26.
pg_index- 50.27.
pg_inherits- 50.28.
pg_init_privs- 50.29.
pg_language- 50.30.
pg_largeobject- 50.31.
pg_largeobject_metadata- 50.32.
pg_namespace- 50.33.
pg_opclass- 50.34.
pg_operator- 50.35.
pg_opfamily- 50.36.
pg_partitioned_table- 50.37.
pg_policy- 50.38.
pg_proc- 50.39.
pg_publication- 50.40.
pg_publication_rel- 50.41.
pg_range- 50.42.
pg_replication_origin- 50.43.
pg_rewrite- 50.44.
pg_seclabel- 50.45.
pg_sequence- 50.46.
pg_shdepend- 50.47.
pg_shdescription- 50.48.
pg_shseclabel- 50.49.
pg_statistic- 50.50.
pg_statistic_ext- 50.51.
pg_statistic_ext_data- 50.52.
pg_subscription- 50.53.
pg_subscription_rel- 50.54.
pg_tablespace- 50.55.
pg_transform- 50.56.
pg_trigger- 50.57.
pg_ts_config- 50.58.
pg_ts_config_map- 50.59.
pg_ts_dict- 50.60.
pg_ts_parser- 50.61.
pg_ts_template- 50.62.
pg_type- 50.63.
pg_user_mapping- 50.64. System Views
- 50.65.
pg_available_extensions- 50.66.
pg_available_extension_versions- 50.67.
pg_config- 50.68.
pg_cursors- 50.69.
pg_file_settings- 50.70.
pg_group- 50.71.
pg_hba_file_rules- 50.72.
pg_indexes- 50.73.
pg_locks- 50.74.
pg_matviews- 50.75.
pg_policies- 50.76.
pg_prepared_statements- 50.77.
pg_prepared_xacts- 50.78.
pg_publication_tables- 50.79.
pg_replication_origin_status- 50.80.
pg_replication_slots- 50.81.
pg_roles- 50.82.
pg_rules- 50.83.
pg_seclabels- 50.84.
pg_sequences- 50.85.
pg_settings- 50.86.
pg_shadow- 50.87.
pg_shmem_allocations- 50.88.
pg_stats- 50.89.
pg_stats_ext- 50.90.
pg_tables- 50.91.
pg_timezone_abbrevs- 50.92.
pg_timezone_names- 50.93.
pg_user- 50.94.
pg_user_mappings- 50.95.
pg_views - 50.2.
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. Postgres Pro'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.