Updated on 2024-06-03 GMT+08:00

ADM_HIST_SQLTEXT

ADM_HIST_SQLTEXT displays information about statements executed on the current node. By default, only the system administrator can access this view. Common users can access the view only after being authorized. This view exists in the PG_CATALOG and SYS schemas.

After the WDR snapshot function is enabled (that is, the GUC parameter enable_wdr_snapshot is set to on), users can view the data in this view.

Table 1 ADM_HIST_SQLTEXT columns

Name

Type

Description

dbid

integer

Database ID.

sql_id

bigint

Query ID.

sql_text

clob

Text corresponding to the query.

command_type

integer

Not supported. Set it to 0.

con_dbid

integer

Database ID of a container, which is currently set to a value the same as that of dbid.

con_id

integer

Container ID. Containers are not supported and this field is set to 0.