数据仓库服务 GAUSSDB(DWS)-其它函数:get_volatile_pg_attribute(relname text, attrname text)

时间:2024-11-28 17:38:53

get_volatile_pg_attribute(relname text, attrname text)

描述:获取当前会话中指定volatile临时表相关的pg_attribute元数据。该函数仅8.2.0及以上集群版本支持。

参数:

  • relname:表名(必须在当前会话中)。
  • attrname:列名。

返回值类型:record

返回值字段:

  • oid:返回该列信息的oid。
  • 其他字段:同pg_attribute系统表中的基础字段(不包括系统隐藏字段)。

示例:

1
2
3
4
5
6
7
8
SELECT * FROM get_volatile_pg_attribute('tx1', 'b');
 attrelid | attname | atttypid | attstattarget | attlen | attnum | attndims | attcacheoff | atttypmod | attbyval | attstorage | attalign | attnotnull | atthasdef | attisdropped | attislocal |
 attcmprmode | attinhcount | attcollation | attacl | attoptions | attfdwoptions | attinitdefval | attkvtype
----------+---------+----------+---------------+--------+--------+----------+-------------+-----------+----------+------------+----------+------------+-----------+--------------+------------+
-------------+-------------+--------------+--------+------------+---------------+---------------+-----------
    16772 | b       |       25 |            -1 |     -1 |      2 |        0 |          -1 |        -1 | f        | x          | i        | f          | f         | f            | t          |
 127         |           0 |          100 |        |            |               |               | 0
(1 row)
support.huaweicloud.com/sqlreference-830-dws/dws_06_0062.html