原文链接:
我的github :https://github.com/TheFrancisHe/Postgresql/blob/master/%E5%85%B3%E4%BA%8EPostgres%E7%9A%84oid%E4%BD%BF%E7%94%A8%E7%96%91%E9%97%AE.md
- 之前,我已经介绍了oid是什么,oid应该如何使用。
但是在使用oid的过程中,我自己碰到一个问题:
//1.运行完如下语句后,'boolean'::regtype的值是 boolean。
postgres=# select 16::regtype ;
regtype
---------
boolean
(1 row)
//2.于是我就推断:如果运行select 'boolean'::regtype应该返回的是16吧! (16是其对应的 oid 的值)
//于是运行如下语句:
postgres=# select 'bool