目次
pg_aggregatepg_ampg_amoppg_amprocpg_attrdefpg_attributepg_authidpg_auth_memberspg_castpg_classpg_collationpg_constraintpg_conversionpg_databasepg_db_role_settingpg_default_aclpg_dependpg_descriptionpg_enumpg_event_triggerpg_extensionpg_foreign_data_wrapperpg_foreign_serverpg_foreign_tablepg_indexpg_inheritspg_init_privspg_languagepg_largeobjectpg_largeobject_metadatapg_namespacepg_opclasspg_operatorpg_opfamilypg_parameter_aclpg_partitioned_tablepg_policypg_procpg_publicationpg_publication_namespacepg_publication_relpg_rangepg_replication_originpg_rewritepg_seclabelpg_sequencepg_shdependpg_shdescriptionpg_shseclabelpg_statisticpg_statistic_extpg_statistic_ext_datapg_subscriptionpg_subscription_relpg_tablespacepg_transformpg_triggerpg_ts_configpg_ts_config_mappg_ts_dictpg_ts_parserpg_ts_templatepg_typepg_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.
<productname>PostgreSQL</productname>'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, <command>CREATE
DATABASE</command> inserts a row into the
<structname>pg_database</structname> 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.
システムカタログとは、リレーショナルデータベース管理システムがテーブルや列の情報などのスキーマメタデータと内部的な情報を格納する場所です。
PostgreSQLのシステムカタログは通常のテーブルです。
テーブルを削除したり再作成したり、列の追加および値の挿入や更新をすることは可能ですが、これらの操作でデータベースシステムを台なしにしてしまう可能性もあります。
通常手作業でシステムカタログを変更してはいけません。
その代わりとしてSQLコマンドを使用します(例えばCREATE DATABASEによりpg_databaseカタログに1行挿入し、ディスク上にデータベースを実際に作成します)。
しかし特に難易度の高い操作の時などの例外がありますが、それらの多くは時間と共にSQLコマンドとして利用可能となっており、それゆえシステムカタログを直接操作する必要は無くなってきています。