查看表的OID
来源:互联网 发布:淘宝店主有话说范文 编辑:程序博客网 时间:2024/06/07 13:00
在PostgreSQL中,OID(对象标识符)用来在整个数据库集簇中唯一地标识一个数据库对象,这个数据库对象可以是数据库、表、索引、视图、远足、类型等。
pg提供了Oid数据类型来表示OID,它实际上是一个无符号整数。
highgo=# select oid from pg_class where relname='test' ;
oid
-------
49273
49236
49233
(3 rows)
highgo=# select oid,relowner,reltype from pg_class where relname='test' ;
oid | relowner | reltype
-------+----------+---------
49273 | 10 | 49275
49236 | 10 | 49238
49233 | 10 | 49235
(3 rows)
highgo=# select * from test;
id | name
----+-------
1 | aaaaa
2 | bbbbb
(2 rows)
highgo=# select * from a.test;
id
----
4
3
5
6
(4 rows)
highgo=# select * from b.test;
id
----
2
(1 row)
[highgo@sourcedb ~]$ oid2name -V
oid2name (HighGo Database) 3.0.2
[highgo@sourcedb ~]$ oid2name -d highgo
From database "highgo":
Filenode Table Name
-----------------------------
49586 atest
49645 banji
49304 banji
49337 china
49298 edoc_todoworklist
49568 my_colors
49295 myt
49642 test
49618 test
49621 test
[highgo@sourcedb ~]$ oid2name
All databases:
Oid Database Name Tablespace
----------------------------------
13010 highgo pg_default
13005 template0 pg_default
1 template1 pg_default
49648 test pg_default
[highgo@sourcedb ~]$ oid2name -s
All tablespaces:
Oid Tablespace Name
-----------------------
1663 pg_default
1664 pg_global
[highgo@sourcedb ~]$ oid2name -d highgo -f 49621
From database "highgo":
Filenode Table Name
----------------------
49621 test
[highgo@sourcedb ~]$ oid2name -d highgo -t test -f 49621 -x
From database "highgo":
Filenode Table Name Oid Schema Tablespace
-------------------------------------------------
49642 test 49273 public pg_default
49618 test 49236 b pg_default
49621 test 49233 a pg_default
[highgo@sourcedb ~]$
pg提供了Oid数据类型来表示OID,它实际上是一个无符号整数。
highgo=# select oid from pg_class where relname='test' ;
oid
-------
49273
49236
49233
(3 rows)
highgo=# select oid,relowner,reltype from pg_class where relname='test' ;
oid | relowner | reltype
-------+----------+---------
49273 | 10 | 49275
49236 | 10 | 49238
49233 | 10 | 49235
(3 rows)
highgo=# select * from test;
id | name
----+-------
1 | aaaaa
2 | bbbbb
(2 rows)
highgo=# select * from a.test;
id
----
4
3
5
6
(4 rows)
highgo=# select * from b.test;
id
----
2
(1 row)
[highgo@sourcedb ~]$ oid2name -V
oid2name (HighGo Database) 3.0.2
[highgo@sourcedb ~]$ oid2name -d highgo
From database "highgo":
Filenode Table Name
-----------------------------
49586 atest
49645 banji
49304 banji
49337 china
49298 edoc_todoworklist
49568 my_colors
49295 myt
49642 test
49618 test
49621 test
[highgo@sourcedb ~]$ oid2name
All databases:
Oid Database Name Tablespace
----------------------------------
13010 highgo pg_default
13005 template0 pg_default
1 template1 pg_default
49648 test pg_default
[highgo@sourcedb ~]$ oid2name -s
All tablespaces:
Oid Tablespace Name
-----------------------
1663 pg_default
1664 pg_global
[highgo@sourcedb ~]$ oid2name -d highgo -f 49621
From database "highgo":
Filenode Table Name
----------------------
49621 test
[highgo@sourcedb ~]$ oid2name -d highgo -t test -f 49621 -x
From database "highgo":
Filenode Table Name Oid Schema Tablespace
-------------------------------------------------
49642 test 49273 public pg_default
49618 test 49236 b pg_default
49621 test 49233 a pg_default
[highgo@sourcedb ~]$
阅读全文
0 0
- 查看表的OID
- MIB OID的生成
- @OID的用法
- SNMP的OID小集
- SNMP常用的OID
- OID的编码规则
- OID
- oid
- 如何修改postgresql中一个表的oid
- SNMP表量索引到OID的转换规则
- LINUX 的OID中英文对照
- LINUX 的OID中英文对照
- linux 的SNMP常用OID
- <id>元素的映射OID
- OID,唯一性的标志
- SNMP协议OID的使用
- Postgresql 获取某张表的oid
- SNMP OID列表 监控需要用到的OID
- 【poj 1236】Network of Schools 【IOI 1996】
- view composer in laravel
- JAVA获取随机数的三种方式
- python文件选择对话框
- IntelliJ idea添加jdk
- 查看表的OID
- day5_结构体做函数参数
- 作业
- centos7虚拟机初始化配置及克隆
- 当你在设置里修改字体大小的时候,到底在修改什么
- 机器学习学习笔记.day4
- RecycleView的分割线类
- JBOSS简介及安装部署
- remove-element