PostgreSQL学习手册(系统表)(3)
来源:未知 责任编辑:责任编辑 发表时间:2014-01-26 22:01 点击:次
	   
	
	  
	  
	  aclitem[]   访问权限。
    见如下应用示例:
    #查看指定表对象testtable的模式
    postgres=# SELECT relname,relnamespace,nspname FROM pg_class c,pg_namespace n WHERE relname = 'testtable' AND relnamespace = n.oid;
      relname   | relnamespace | nspname
    -------------+--------------+---------
     testtable   |         2200    | public
    (1 row)
    #查看指定表对象testtable的owner(即role)。
    postgres=# select relname,rolname from pg_class c,pg_authid au where relname = 'testtable' and relowner = au.oid;
      relname   | rolname  www.2cto.com  
    -------------+----------
     testtable   | postgres
    (1 row)
二、pg_attribute:
    该系统表存储所有表(包括系统表,如pg_class)的字段信息。数据库中的每个表的每个字段在pg_attribute表中都有一行记录。
名字 类型 引用 描述
attrelid oid pg_class.oid 此字段所属的表。
attname name   字段名。
atttypid oid pg_type.oid 字段的数据类型。
attstattarget int4   attstattarget控制ANALYZE为这个字段设置的统计细节的级别。零值表示不收集统计信息,负数表示使用系统缺省的统计对象。正数值的确切信息是和数据类型相关的。
attlen int2   该字段所属类型的长度。(pg_type.typlen的拷贝)
attnum int2   字段的编号,普通字段是从1开始计数的。系统字段,如oid,是任意的负数。
	
	
        
        
        
	
        相关新闻>>
最新推荐更多>>>
              
          - 发表评论
 - 
				
 
- 最新评论 进入详细评论页>>
 








