error with documentation for pg_stat_monitor

Description

Hello! I tried to use your program and catch error when used sample from your documentation:

postgres=# SELECT application_name, userid AS user_name, datname AS database_name, substr(query,0, 50) AS query, calls, client_ip
postgres-# FROM pg_stat_monitor;
ОШИБКА: столбец "application_name" не существует
LINE 1: SELECT application_name, userid AS user_name, datname AS dat...
^
postgres=# \d pg_stat_monitor;
View "public.pg_stat_monitor"
Column | Type | Collation | Nullable | Default
--------------------+------------------------+-----------------------------
bucket | integer | | |
bucket_start_time | timestamp with time zone | | |
userid | oid | | |
dbid | oid | | |
client_ip | inet | | |
queryid | text | | |
query | text | | |
plans | bigint | | |
plan_total_time | double precision | | |
plan_min_timei | double precision | | |
plan_max_time | double precision | | |
plan_mean_time | double precision | | |
plan_stddev_time | double precision | | |
calls | bigint | | |
total_time | double precision | | |
min_time | double precision | | |
max_time | double precision | | |
mean_time | double precision | | |
stddev_time | double precision | | |
rows | bigint | | |
shared_blks_hit | bigint | | |
shared_blks_read | bigint | | |
shared_blks_dirtied | bigint | | |
shared_blks_written | bigint | | |
local_blks_hit | bigint | | |
local_blks_read | bigint | | |
local_blks_dirtied | bigint | | |
local_blks_written | bigint | | |
temp_blks_read | bigint | | |
temp_blks_written | bigint | | |
blk_read_time | double precision | | |
blk_write_time | double precision | | |
resp_calls | text[] | | |
cpu_user_time | double precision | | |
cpu_sys_time | double precision | | |
tables_names | text[] | | |

Environment

postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
----------------+-------------------------------------------------------------------------------
pg_stat_monitor | 1.0 | public | track execution statistics of all SQL statements executed

select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 13.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit

 

Smart Checklist

Activity

Show:

naeem.akhter October 5, 2021 at 11:18 AM

 

Application_name is now available in the query result and given query runs fine now. 

 

Done

Details

Assignee

Reporter

Labels

Needs QA

Yes

Components

Priority

Smart Checklist

Created January 13, 2021 at 9:51 AM
Updated March 5, 2024 at 9:40 PM
Resolved October 5, 2021 at 11:19 AM