跳到主要内容
版本:1.0.13

兼容的Oracle视图

DBA_SEGMENTS

DBA_SEGMENTS 视图描述的是数据库中所有段的存储和分配信息。

halo0root=# \dS dba_segments
视图 "oracle.dba_segments"
栏位 | 类型 | 校对规则 | 可空的 | 预设
-----------------+-----------------------+----------+--------+------
owner | name | | |

segment_name | name | | |

segment_type | character varying(18) | | |

tablespace_name | name | | |

header_file | oid | | |

header_block | oid | | |

bytes | bigint | | |

blocks | integer | | |

备注:

owner 段所有者的用户名

segment_name 段名

segment_type 段的类型,可能是table,index,logindex,lobsegment等

tablespace_name 包含段的表空间名称

header_file 包含段头的文件的ID

header_block 包含段头的块ID

bytes 段的大小,以字节为单位

blocks 段的大小,以Oracle块为单位


PRODUCT_COMPONENT_VERSION

PRODUCT_COMPONENT_VERSION包含组件产品的版本和状态信息。

halo0root=# \dS product_component_version

视图 "oracle.product_component_version"

栏位 | 类型 | 校对规则 | 可空的 | 预设
---------+------+----------+--------+------
product | text | C | |
version | text | C | |
status | text | | |

备注:

Product 产品的名称

Version 产品的版本号

Status 产品状态包括兼容性高可用性


USER_CONS_COLUMNS

user_con_columns视图提供了当前用户拥有的表中的约束中包含的所有列的信息。

halo0root=# \dS user_cons_columns
视图 "oracle.user_cons_columns"

栏位 | 类型 | 校对规则 | 可空的 | 预设
-----------------+-----------------------------------+----------+--------
constraint_name | information_schema.sql_identifier | | |
column_name | information_schema.sql_identifier | | |
table_name | information_schema.sql_identifier | | |

备注:

constraint_name 约束的名称

column_name 约束中引用的列的名称

table_name 约束所属的表的名称


USER_CONSTRAINTS

USER_CONSTRAINTS视图提供了关于放置在当前用户拥有的表上的所有约束的信息。

halo0root=# \dS user_constraints
视图 "oracle.user_constraints"
栏位 | 类型 | 校对规则 | 可空的 | 预设
-------------------+----------+----------+--------+------
constraint_name | name | | |
index_name | regclass | | |
constraint_type | text | | |
table_name | regclass | | |
r_constraint_name | name | | |

备注:

constraint_name 约束的名称

index_name 索引的名称

constraint_type 约束:P—主键约束;U—唯一键约束;R—引用完整性约束;V—视图上的约束;O在一个视图只读

table_name 约束所属表的名称

r_constraint_name 引用表的约束定义的名称


USER_IND_COLUMNS

USER_IND_COLUMNS描述当前用户拥有的索引的列和当前用户拥有的表上的索引的列。

halo0root=# \dS user_ind_columns
视图 "oracle.user_ind_columns"
栏位 | 类型 | 校对规则 | 可空的 | 预设
-------------+------+----------+--------+------
column_name | name | | |

index_name | name | | |

table_name | name | | |

备注:

column_name 对象类型列的列名或属性

index_name 索引名称

table_name 表或集群的名称


USER_OBJECTS

USER_OBJECTS视图提供了当前用户拥有的所有对象的信息。

halo0root=# \dS user_objects
视图 "oracle.user_objects"
栏位 | 类型 | 校对规则 | 可空的 | 预设
---------------+-----------------------------+----------+--------+------
object_name | name | | |
subject_name | text | | |
object_id | oid | | |
object_type | text | | |
created | timestamp without time zone | | |
last_ddl_time | timestamp without time zone | | |
status | text | | |
namespace | oid | | |

备注:

object_name 对象的名称

subject_name 子对象的名称

object_id 对象id

object_type 对象的类型。可能的值是:索引、函数、包、包体、过程、序列、同义词、表、触发器和视图对象类型

created 创建对象的时间戳

last_ddl_time 由DDL语句(包括授予和撤销)导致的对象最后一次修改的时间戳

status 对象的状态:valid

namespace


USER_PROCEDURES

USER_PROCEDURES列出当前用户拥有的所有函数和过程,以及它们的相关属性。

halo0root=# \dS user_procedures
视图 "oracle.user_procedures"
栏位 | 类型 | 校对规则 | 可空的 | 预设
-------------+------+----------+--------+------
object_name | name | | |

备注:

object_name:对象的名称


USER_SOURCE

USER_SOURCE描述当前用户拥有的存储对象的文本源。

halo0root=# \dS user_source
视图 "oracle.user_source"
栏位 | 类型 | 校对规则 | 可空的 | 预设
------+--------+----------+--------+------
line | bigint | | |
oid | oid | | |
text | text | C | |
name | name | | |
type | text | | |

备注:

Line 源文件的行号

oid

text 存储对象的文本源

name 对象的名称

type 对象的类型:函数,JAVA源代码,包,包体,过程,触发器,类型,类型体


USER_TAB_COLUMNS

USER_TAB_COLUMNS视图显示当前用户拥有的表和视图中所有列的信息。

halo0root=# \dS user_tab_columns
视图 "oracle.user_tab_columns"
栏位 | 类型 | 校对规则 | 可空的 | 预设
----------------+------------------------------------+----------+--------
table_name | information_schema.sql_identifier | | |
column_name | information_schema.sql_identifier | | |
data_type | information_schema.character_data | | |
data_length | information_schema.cardinal_number | | |
data_precision | information_schema.cardinal_number | | |
data_scale | information_schema.cardinal_number | | |
nullable | information_schema.yes_or_no | | |
column_id | information_schema.cardinal_number | | |
data_upgraded | information_schema.yes_or_no | | |
table_schema | information_schema.sql_identifier | | |

备注:

table_name 列所在的表或视图的名称

column_name 列的名称

data_type 列的数据类型

data_length 文本列的长度

data_precision NUMBER列的精度(位数)

data_scale NUMBER列的比列

nullable 列是否为空,可能的值是:Y --列为空;N--列不允许为空

column_id 列在表中相对位置

data_upgraded 指示列数据是否已升级到最新的类型版本格式(YES)或

(NO)

table_schema 表架构


USER_TABLES

USER_TABLES视图显示当前用户拥有的所有表的信息。

halo0root=# \dS user_tables
视图 "oracle.user_tables"
栏位 | 类型 | 校对规则 | 可空的 | 预设
------------+-----------------------------------+----------+--------+------
table_name | information_schema.sql_identifier | | |

USER_VIEWS

USER_VIEWS视图提供了当前用户拥有的所有视图的信息。

halo0root=# \dS user_views
视图 "oracle.user_views"
栏位 | 类型 | 校对规则 | 可空的 | 预设
-----------+------+----------+--------+------
view_name | name | | |
owner | name | | |

备注:

view_name 视图的名称

owner 视图的所有者


DUAL

dual是单行、单列表,仅为兼容Oracle数据库而提供。

halo0root=# \dS dual
视图 "public.dual"
栏位 | 类型 | 校对规则 | 可空的 | 预设
-------+-------------------+----------+--------+------
dummy | character varying | | |

备注

dummy 仅为兼容性提供