doc-exports/docs/dws/dev/dws_04_0582.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

124 lines
11 KiB
HTML

<a name="EN-US_TOPIC_0000001098814580"></a><a name="EN-US_TOPIC_0000001098814580"></a>
<h1 class="topictitle1">PG_DATABASE</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001098814580__a1394ee1be7024608b9fb97d1b872b3a1"><strong id="EN-US_TOPIC_0000001098814580__b31011246132912">PG_DATABASE</strong> records information about the available databases.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001098814580__t8d1911a1aaa6444fb4622cb1415969de" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_DATABASE columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001098814580__ra8ce5dd940d14530accc3a6dc12be239"><th align="left" class="cellrowborder" valign="top" width="25.77%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001098814580__acdbb2b663049403bb1c657f4c01fe271"><strong id="EN-US_TOPIC_0000001098814580__b84235270691445">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.73%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001098814580__aae526ee2e28d4d0ab39be70af418623b">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.49999999999999%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001098814580__aee93a2d017fb483993a033afc5f5cceb">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001098814580__rdf8206fbcc974d928c28b82212c6272c"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__ad8ae4f391bb946f59945d97310056864">datname</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__ac241898c7de74f129583f6e1852f7860">name</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__a28f2e8bc4f44475e9a6929c5639e772f">Database name</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__rc93917d6bfc5491798facf38eb5d863c"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__ab7d9f3b46efb401987f054cbe06cbf78">datdba</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__a64525633faf24daf9120b9a46334b18b">oid</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__a98488178fda54604a1457345c128ccf5">Owner of the database, usually the user who created it</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r19c8680778e349b8babc0d75bcbbbe00"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__a0e5b6b088a8f4a67941fd07b625956a4">encoding</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__a4e0a4e0ff0074197a77ffb34796119fd">integer</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__p149251119142614">Database encoding.</p>
<p id="EN-US_TOPIC_0000001098814580__a8a39792401f34a9cb6d129a5391b4e39">You can use pg_encoding_to_char() to convert this number to the encoding name.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r73aff32a7b194d1e8e555eefafe6cc7c"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__aafc549e6e7954ccd8c1f6dd256676be9">datcollate</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__ab11eaf196554463a9cedb813d8d1ea77">name</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__af74dbcd325fe47968781cfeb2d7a4831">Sequence used by the database</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r2fc20bc93a4846b29c6a51de3c1850ad"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__a09f3e5a5a5c14a2498b24b9f33073589">datctype</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__ac12ef146de95419d989411b607cc50cd">name</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__afc907fcc61c64818a7e7c5cbcf0f680d">Character type used by the database</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__re617b0446f2a4154936052e233296fe4"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__afba6bc1f4e0641c1a48aca7e9ce87af4">datistemplate</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__a5d62a3904f6343988c9f9178f201a664"><span id="EN-US_TOPIC_0000001098814580__text1113917125324">boolean</span></p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__a71be37fe94f54db5a560aa041733b7b0">Whether this column can serve as a template database</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r7898ff19111743118979a16f220c9734"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__a5ae41fdffef04f99b16be5c55f5a7454">datallowconn</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__ac0eee947265443f591dee6195fcbafa2"><span id="EN-US_TOPIC_0000001098814580__text6144161383218">boolean</span></p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__acda96d66a3954a11bd986f92fd29e7a3">If false then no one can connect to this database. This column is used to protect the <strong>template0</strong> database from being altered.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__ra9ee09ab6e53477c8ffaed1d39931d2c"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__a8cd52b99c73c4767ab6be6b92a997570">datconnlimit</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__abe7ea9857a194a9d84508334f6a622ac">integer</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__a6fe0592ebc1b4ece82330f6aaa5ff5ff">Maximum number of concurrent connections allowed on this database. <strong id="EN-US_TOPIC_0000001098814580__b842352706193719">-1</strong> indicates no limit.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r9073bef068704b65a384fef7eab883e8"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__a56223515761e459195f4d91044263849">datlastsysoid</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__a06975ff86efe47cca255a9e0d6a6c831">oid</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__a7cd7bcc2ebd54911bf5c1c300c5239ce">Last system OID in the database</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r095a8d5607684cff9371a0e940893c34"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__ac424947a5ee042dfa7330d6441428aef">datfrozenxid</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__ab47433fee7c44709b760f0ae83c7b8f7">xid32</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__p3787183963214">Tracks whether the database needs to be vacuumed in order to prevent transaction ID wraparound.</p>
<p id="EN-US_TOPIC_0000001098814580__abbfb25de76a44f9b95e280ee6e855161">To ensure forward compatibility, this column is reserved. The <strong id="EN-US_TOPIC_0000001098814580__b0384124074217">datfrozenxid64</strong> column is added to record the information.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r1cfc7748808c49f692f9c269d01970a2"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__a1c70f8f1c6714cabb8702a510f53d744">dattablespace</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__a91281a31c88e4cc893fe7ea13ed26866">oid</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__a4875a637ae944e98a2e06229be499abb">Default tablespace of the database</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r31231f0b537741fb8bdfecfbd64a1b6f"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__a573e828acd02425ea5b282b77b33f03d">datcompatibility</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__ad189dbda00b64533853d82e78e360ed1">name</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__af81f368daf0e4391a7ab1c74e97448d0">Database compatibility mode</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__r8f794ef4c0484a3c90adc3f5056fc1f9"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__af93c74cadc464fc082791bc8cd753310">datacl</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__a9665bf6bf60b4b0bb27e1a22fd86a79b">aclitem[]</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__a04d6798f233f4a138de2b33c62554ccd">Access permissions</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814580__row027011018487"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814580__p127014019483">datfrozenxid64</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814580__p172710074815">xid</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814580__p20271100482">Tracks whether the database needs to be vacuumed in order to prevent transaction ID wraparound.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0561.html">System Catalogs</a></div>
</div>
</div>