Re: pg_stat_statements_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2023-09-11 at 14:26 -0700, Wells Oliver wrote:
> I don't have this view:
> 
> ERROR:  relation "pg_stat_statements_info" does not exist
> LINE 1: select * from pg_stat_statements_info;
>                       ^
> But I definitely have the pg_stat_statements extension installed and query pg_stat_statements quite frequently... What gives?

This query will show you the version installed and the schema:

  SELECT extversion, extnamespace::regnamespace
  FROM pg_extension
  WHERE extname = 'pg_stat_statements';

"pg_stat_statements_info" is not a view, but a function, so if the extension
schema is "public", try

  SELECT * FROM public.pg_stat_statements_info();

Yours,
Laurenz Albe






[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux