# PG_TABLES
PG_TABLES视图可用来查询数据库中每个表的有用信息。具体字段信息如[表1]所示。
 表1PG_TABLES字段 
| 名称          | 类型      | 引用                                                                                                                     | 描述                       |
|:---|:---|:---|:---|
| schemaname  | name    | [PG_NAMESPACE](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0998.html).nspname               | 表的模式名。                   |
| tablename   | name    | [PG_CLASS](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0976.html).relname                   | 表名。                      |
| tableowner  | name    | pg_get_userbyid([PG_CLASS](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0976.html).relowner) | 表的所有者。                   |
| tablespace  | name    | [PG_TABLESPACE](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-1015.html).spcname              | 包含表的表空间，默认为NULL。         |
| hasindexes  | boolean | [PG_CLASS](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0976.html).relhasindex               | 如果表上有索引（或者最近拥有）则为t，否则为f。 |
| hasrules    | boolean                                           | [PG_CLASS](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0976.html).relhasrules               | 如果表上有规则，则为t，否则为f。        |
| hastriggers | boolean                                          | [PG_CLASS](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0976.html).RELHASTRIGGERS            | 如果表上有触发器，则为t，否则为f。       |
| tablecreator                                          | name                                               | pg_get_userbyid([PG_OBJECT](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0999.html).creator)                                          | 表的所有者。                                                              |
| created                                              | timestamp with time zone                           | [PG_OBJECT](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0999.html).ctime                                                             | 表的创建时间。                                                            |
| last_ddl_time                                           | timestamp with time zone                          | [PG_OBJECT](https://support.huaweicloud.com/distributed-ref-v10-gaussdb/gaussdb-08-0999.html).mtime                                                               | 最后一次对该表执行DDL操作的时间。                                                 |
   
