バージョンごとのドキュメント一覧

53.15. pg_database #

The catalog <structname>pg_database</structname> stores information about the available databases. Databases are created with the <link linkend="sql-createdatabase"><command>CREATE DATABASE</command></link> command. Consult <xref linkend="managing-databases"/> for details about the meaning of some of the parameters. pg_databaseカタログには使用可能なデータベースの情報が格納されます。 データベースはCREATE DATABASEコマンドで作成されます。 いくつかのパラメータの詳細については第23章を参照してください。

Unlike most system catalogs, <structname>pg_database</structname> is shared across all databases of a cluster: there is only one copy of <structname>pg_database</structname> per cluster, not one per database. ほとんどのシステムカタログとは異なり、pg_databaseはクラスタにおける全てのデータベースにわたって共有されます。 データベース毎に1つではなく、クラスタ毎にたった1つだけpg_databaseのコピーが存在します。

表53.15 pg_databaseの列

<title><structname>pg_database</structname> Columns</title>

Column Type 列 型

Description 説明

oid oid

Row identifier 行識別子

datname name

Database name データベース名

datdba oid (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>) (参照先 pg_authid.oid

Owner of the database, usually the user who created it データベースの所有者。通常はそのデータベースの作成者

encoding int4

Character encoding for this database (<link linkend="pg-encoding-to-char"><function>pg_encoding_to_char()</function></link> can translate this number to the encoding name) このデータベースの文字エンコード(pg_encoding_to_char()で、この番号からエンコード方式名称に変換できます)

datlocprovider char

Locale provider for this database: <literal>c</literal> = libc, <literal>i</literal> = icu このデータベースのロケールプロバイダ: c = libc、 i = icu

datistemplate bool

If true, then this database can be cloned by any user with <literal>CREATEDB</literal> privileges; if false, then only superusers or the owner of the database can clone it. trueの場合、このデータベースはどのユーザでもCREATEDBを使って複製できます。 falseの場合、スーパーユーザまたはデータベースの所有者だけが複製できます。

datallowconn bool

If false then no one can connect to this database. This is used to protect the <literal>template0</literal> database from being altered. falseの場合、このデータベースには誰も接続できません。 これはtemplate0データベースが変更されることを防ぐために使用されます。

datconnlimit int4

Sets maximum number of concurrent connections that can be made to this database. -1 means no limit, -2 indicates the database is invalid. このデータベースに対する同時のコネクションの最大数を設定します。 -1は無制限を意味し、-2はデータベースが無効であることを示します。

datfrozenxid xid

All transaction IDs before this one have been replaced with a permanent (<quote>frozen</quote>) transaction ID in this database. This is used to track whether the database needs to be vacuumed in order to prevent transaction ID wraparound or to allow <literal>pg_xact</literal> to be shrunk. It is the minimum of the per-table <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relfrozenxid</structfield> values. このデータベースの中で、この値よりも前のトランザクションIDは、永続的な(凍結された)トランザクションIDを持つように変更されています。 これは、このデータベースに対して、トランザクションID周回を防ぎ、かつ、pg_xactを縮小させることを目的としたバキュームを行うかどうかを追跡するために使用されます。 これはテーブル毎のpg_class.relfrozenxid値の最小値になります。

datminmxid xid

All multixact IDs before this one have been replaced with a transaction ID in this database. This is used to track whether the database needs to be vacuumed in order to prevent multixact ID wraparound or to allow <literal>pg_multixact</literal> to be shrunk. It is the minimum of the per-table <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relminmxid</structfield> values. このデータベース内のトランザクションIDで置換される前のすべてのマルチトランザクションID。 これは、トランザクションIDの周回問題を防ぐ、またはpg_multixactを縮小させるためにデータベースをバキュームする必要があるかどうかを追跡するために使用されます。 これはテーブル毎のpg_class.relminmxidの最小値です。

dattablespace oid (references <link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.<structfield>oid</structfield>) (参照先 pg_tablespace.oid

The default tablespace for the database. Within this database, all tables for which <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>reltablespace</structfield> is zero will be stored in this tablespace; in particular, all the non-shared system catalogs will be there. データベース用のデフォルトテーブル空間。 このデータベース内でpg_class.reltablespaceがゼロであるすべてのテーブルは、このテーブル空間に格納されます。 特に、共有されていないすべてのシステムカタログはこのテーブル空間にあります。

datcollate text

LC_COLLATE for this database このデータベースのLC_COLLATE

datctype text

LC_CTYPE for this database このデータベースのLC_CTYPE

daticulocale text

ICU locale ID for this database このデータベースのICUロケールID

daticurules text

ICU collation rules for this database このデータベースのICU照合規則

datcollversion text

Provider-specific version of the collation. This is recorded when the database is created and then checked when it is used, to detect changes in the collation definition that could lead to data corruption. この照合順序に対する提供者固有のバージョンです。 これはデータベースが作成された時に記録され、データの破壊につながりかねない照合順序定義の変更を検知するために使用時に検査されます。

datacl aclitem[]

Access privileges; see <xref linkend="ddl-priv"/> for details アクセス権限。 詳細は5.7を参照してください