Postgres 9.2中的ROWID等效项 [英] ROWID equivalent in postgres 9.2

查看:102
本文介绍了Postgres 9.2中的ROWID等效项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在postgres中获取记录的行标识符?

Is there any way to get rowid of a record in postgres??

在oracle中我可以使用

In oracle i can use like

SELECT MAX(BILLS.ROWID) FROM BILLS  


推荐答案

是的,有ctid列与rowid等效。但是对你没用。 Rowid和ctid是物理行/元组标识符=>在重建/清空后可以更改。

Yes, there is ctid column which is equivalent for rowid. But is useless for you. Rowid and ctid are physical row/tuple identifiers => can change after rebuild/vacuum.

请参阅: 第5章。数据定义> 5.4。系统列

这篇关于Postgres 9.2中的ROWID等效项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆