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