ROWIDTOCHAR

最近更新时间: 2025-02-18 16:02:00

转换rowid值为varchar2类型。

  • 复制
    复制成功
postgres=# \d+ t_rowid
                                  Table "public.t_rowid"
 Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
--------+---------+-----------+----------+---------+---------+--------------+-------------
 f1     | integer |           | not null |         | plain   |              | 
 f2     | integer |           |          |         | plain   |              | 
Distribute By: SHARD(f1)
Location Nodes: ALL DATANODES
postgres=# SELECT ROWIDTOCHAR(rowid),rowid from t_rowid;
     rowidtochar      |        rowid         
----------------------+----------------------
 XPK3fw==AAAAAA==AQA= | XPK3fw==AAAAAA==AQA=
(1 row)
postgres=#