Re: pg_stat_statements_info

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_stat_statements_info
Date: 2023-09-12 04:08:37
Message-ID: CAOC+FBV7ub_e0SdM1Tzvva4d1UVfso5GApiK=upAc=h4VW9hDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Does this make sense?

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

Shows 1.8 and public, but..

SELECT * FROM public.pg_stat_statements_info();

ERROR: function public.pg_stat_statements_info() does not exist
LINE 1: SELECT * FROM public.pg_stat_statements_info();
^
HINT: No function matches the given name and argument types. You might
need to add explicit type casts.

This is on RDS, I am not sure if the extension should somehow behave
differently installed there.

On Mon, Sep 11, 2023 at 7:24 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:

> 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
>

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2023-09-12 04:44:30 Re: pg_stat_statements_info
Previous Message Laurenz Albe 2023-09-12 02:24:45 Re: pg_stat_statements_info