doc-exports/docs/dws/dev/dws_06_0343.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:24:04 +00:00

27 lines
3.1 KiB
HTML

<a name="EN-US_TOPIC_0000001446391164"></a><a name="EN-US_TOPIC_0000001446391164"></a>
<h1 class="topictitle1">Comment Checking Functions</h1>
<div id="body0000001446391164"><div class="section" id="EN-US_TOPIC_0000001446391164__section1046310524417"><h4 class="sectiontitle">col_description(table_oid, column_number)</h4><p id="EN-US_TOPIC_0000001446391164__p1846205224110">Description: Gets comment for a table column.</p>
<p id="EN-US_TOPIC_0000001446391164__p14462155215419">Return type: text</p>
<p id="EN-US_TOPIC_0000001446391164__p546355234117">Note: <strong id="EN-US_TOPIC_0000001446391164__b102378749994131">col_description</strong> returns the comment for a table column, which is specified by the OID of its table and its column number.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001446391164__section467825524116"><h4 class="sectiontitle">obj_description(object_oid, catalog_name)</h4><p id="EN-US_TOPIC_0000001446391164__p1367819555416">Description: Gets comment for a database object.</p>
<p id="EN-US_TOPIC_0000001446391164__p2067805517415">Return type: text</p>
<p id="EN-US_TOPIC_0000001446391164__p10678655164117">Note: The two-parameter form of <strong id="EN-US_TOPIC_0000001446391164__b20533363194131">obj_description</strong> returns the comment for a database object specified by its OID and the name of the containing system catalog. For example, <strong id="EN-US_TOPIC_0000001446391164__b47076853294131">obj_description(123456,'pg_class')</strong> would retrieve the comment for the table with OID 123456. The one-parameter form of <strong id="EN-US_TOPIC_0000001446391164__b148498956494131">obj_description</strong> requires only the object OID.</p>
<p id="EN-US_TOPIC_0000001446391164__p2678175544119"><strong id="EN-US_TOPIC_0000001446391164__b170884545794131">obj_description</strong> cannot be used for table columns since columns do not have OIDs of their own.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001446391164__section175389015421"><h4 class="sectiontitle">obj_description(object_oid)</h4><p id="EN-US_TOPIC_0000001446391164__p145381906424">Description: Gets comment for a database object.</p>
<p id="EN-US_TOPIC_0000001446391164__p175388018425">Return type: text</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001446391164__section135071312422"><h4 class="sectiontitle">shobj_description(object_oid, catalog_name)</h4><p id="EN-US_TOPIC_0000001446391164__p250710344214">Description: Gets comment for a shared database object.</p>
<p id="EN-US_TOPIC_0000001446391164__p175071138420">Return type: text</p>
<p id="EN-US_TOPIC_0000001446391164__p20507183104218">Note: <strong id="EN-US_TOPIC_0000001446391164__b142382051794131">shobj_description</strong> is used just like <strong id="EN-US_TOPIC_0000001446391164__b101861366494131">obj_description</strong> except the former is used for retrieving comments on shared objects. Some system catalogs are global to all databases within each cluster, and the comments for objects in them are stored globally as well.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0051.html">System Information Functions</a></div>
</div>
</div>