查询记录所在dn

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

  • 复制
    复制成功
postgres=# select xc_node_id,* from t1;
 xc_node_id | f1 | f2 
------------+----+----
 2142761564 |  1 |  3
 2142761564 |  1 |  3
(2 rows)
postgres=# select t1.xc_node_id,pgxc_node.node_name,t1.* from t1,pgxc_node where t1.xc_node_id=pgxc_node.node_id;
 xc_node_id | node_name | f1 | f2 
------------+-----------+----+----
 2142761564 | dn001     |  1 |  3
 2142761564 | dn001     |  1 |  3
(2 rows)
postgres=#