.. _postgresql_pg_tables:

pg_tables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

视图pg_tables提供对数据库中每个表的信息的访问。

.. table:: pg_tables 列
      :widths: 3, 2, 4
      :class: longtable
     
      +-------------+---------+--------------------------------------------------------------+
      | 名称        | 类型    | 描述                                                         |
      +=============+=========+==============================================================+
      | schemaname  | name    | 包含表的模式名                                               |
      +-------------+---------+--------------------------------------------------------------+
      | tablename   | name    | 表名                                                         |
      +-------------+---------+--------------------------------------------------------------+
      | tableowner  | name    | 表拥有者的名字                                               |
      +-------------+---------+--------------------------------------------------------------+
      | tablespace  | name    | 包含表的表空间的名字（如果使用数据库的默认表空间，此列为空） |
      +-------------+---------+--------------------------------------------------------------+
      | hasindexes  | boolean | 如果表有（或最近有过）任何索引，此列为真                     |
      +-------------+---------+--------------------------------------------------------------+
      | hasrules    | boolean | 如果表有（或曾经有过）规则，此列为真                         |
      +-------------+---------+--------------------------------------------------------------+
      | hastriggers | boolean | 如果表有（或者曾经有过）触发器，此列为真                     |
      +-------------+---------+--------------------------------------------------------------+
      | rowsecurity | boolean | 如果表上启用了行安全性则为真                                 |
      +-------------+---------+--------------------------------------------------------------+
