public inbox for [email protected]  
help / color / mirror / Atom feed
From: Kashif Zeeshan <[email protected]>
To: Ayush Vatsa <[email protected]>
Cc: [email protected]
Subject: Re: Issue with pgstattuple on Sequences in PostgreSQL
Date: Mon, 24 Jun 2024 16:38:33 +0500
Message-ID: <CAAPsdhfNRaVt6EkNDmprk0eLHHDbq8M1bhSO1nC_T3o=Ef-xtg@mail.gmail.com> (raw)
In-Reply-To: <CACX+KaMOd3HHteOJNX7fkWxO+R=uLJkfKqE2-QUK8fKmKfOwqw@mail.gmail.com>
References: <CACX+KaMOd3HHteOJNX7fkWxO+R=uLJkfKqE2-QUK8fKmKfOwqw@mail.gmail.com>

Hi

I dont think Sequences are support, please refer to the following
documentation.

https://www.postgresql.org/docs/current/pgstattuple.html

Regards
Kashif Zeeshan

On Mon, Jun 24, 2024 at 4:09 PM Ayush Vatsa <[email protected]>
wrote:

> Hi PostgreSQL Community,
>
> I was recently exploring the pgstattuple code directory and found this
> piece of code:
> https://github.com/postgres/postgres/blob/master/contrib/pgstattuple/pgstattuple.c#L255-L259
> .
>
> It indicates that pgstattuple supports relations, toast tables,
> materialized views, and sequences.
> However, when I executed a query with a sequence, I encountered the
> following error:
>
> postgres=> CREATE SEQUENCE serial START 101;
> CREATE SEQUENCE
> postgres=> SELECT * FROM pgstattuple('serial');
> ERROR:  only heap AM is supported
> postgres=>
>
> It got stuck in this if condition -
> https://github.com/postgres/postgres/blob/master/contrib/pgstattuple/pgstattuple.c#L326-L329
> How can one use pgstattuple on sequences?
>
> Regards,
> Ayush Vatsa
>


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Issue with pgstattuple on Sequences in PostgreSQL
  In-Reply-To: <CAAPsdhfNRaVt6EkNDmprk0eLHHDbq8M1bhSO1nC_T3o=Ef-xtg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox