blob: d426f0bf9c47867d6c0f9febba4feb6ccc0a2520 [file]
---
title: pg_description
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
The `pg_description` system catalog table stores optional descriptions (comments) for each database object. Descriptions can be manipulated with the `COMMENT` command and viewed with `psql`'s `\d` meta-commands. Descriptions of many built-in system objects are provided in the initial contents of `pg_description`. See also [pg\_shdescription](pg_shdescription.html#topic1), which performs a similar function for descriptions involving objects that are shared across a HAWQ system.
<a id="topic1__gm143898"></a>
<span class="tablecap">Table 1. pg\_catalog.pg\_description</span>
| column | type | references | description |
|----------------|---------|----------------|--------------------------------------------------------------------------------------------------------------|
| `objoid` | oid | any OID column | The OID of the object this description pertains to. |
| `classoid` | oid | pg\_class.oid | The OID of the system catalog this object appears in |
| `objsubid ` | integer |   | For a comment on a table column, this is the column number. For all other object types, this column is zero. |
| `description ` | text |   | Arbitrary text that serves as the description of this object. |